We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d35700 commit a2434e4Copy full SHA for a2434e4
nwbinspector/utils.py
@@ -126,10 +126,11 @@ def robust_s3_read(
126
for retry in range(max_retries):
127
try:
128
return command(*command_args, **command_kwargs)
129
- except OSError: # cannot curl request
130
- sleep(0.1 * 2**retry)
131
except Exception as exc:
132
- raise exc
+ if "curl" in str(exc): # 'cannot curl request' can show up in potentially many different return error types
+ sleep(0.1 * 2**retry)
+ else:
133
+ raise exc
134
raise TimeoutError(f"Unable to complete the command ({command.__name__}) after {max_retries} attempts!")
135
136
0 commit comments