if (opts.retry is None) or (tries == opts.retry):
if DEBUG: DEBUG.info('retries exceeded, re-raising')
- raise exception
+ raise exception # pylint: disable=raising-bad-type
retrycode = getattr(exception, 'errno', None)
if (retrycode is not None) and (retrycode not in opts.retrycodes):
if DEBUG: DEBUG.info('retrycode (%i) not in list %s, re-raising',
retrycode, opts.retrycodes)
- raise exception
+ raise exception # pylint: disable=raising-bad-type
if retrycode is not None and retrycode < 0 and opts.retry_no_cache:
opts.no_cache = True
#####################################################################
# TESTING
def _main_test():
- try: url, filename = sys.argv[1:3]
+ try: url, filename = sys.argv[1:3] # pylint: disable=unbalanced-tuple-unpacking
except ValueError:
print('usage:', sys.argv[0],
'<url> <filename> [copy_local=0|1] [close_connection=0|1]')
def _retry_test():
- try: url, filename = sys.argv[1:3]
+ try: url, filename = sys.argv[1:3] # pylint: disable=unbalanced-tuple-unpacking
except ValueError:
print('usage:', sys.argv[0],
'<url> <filename> [copy_local=0|1] [close_connection=0|1]')