increase sleep time on web request error

This commit is contained in:
Felix Pankratz 2023-07-02 15:45:53 +02:00
parent 2972e222a3
commit c11a24cd9d

View File

@ -46,7 +46,7 @@ def get_actual_manifest(pkg, ver):
break break
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
print('Failed to get index from webservice, retrying...') print('Failed to get index from webservice, retrying...')
time.sleep(1) time.sleep(5)
hexsum = index['files']['/package.json']['hex'] hexsum = index['files']['/package.json']['hex']
manifest_url = 'https://www.npmjs.com/package/{}/file/{}'.format(pkg, hexsum) manifest_url = 'https://www.npmjs.com/package/{}/file/{}'.format(pkg, hexsum)
@ -58,7 +58,7 @@ def get_actual_manifest(pkg, ver):
break break
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
print('Failed getting manifest JSON from webserver, retrying...') print('Failed getting manifest JSON from webserver, retrying...')
time.sleep(1) time.sleep(5)
# now we can parse it # now we can parse it
version = manifest['version'] version = manifest['version']