diff options
author | Pjotr Prins | 2020-11-10 11:41:09 +0000 |
---|---|---|
committer | Pjotr Prins | 2020-11-10 11:41:09 +0000 |
commit | 986bacf77191a159d842605f6bb86f3f92a3be54 (patch) | |
tree | c5f3bf6a767d29eff372e036b4a56233ee42232f /scripts/update_virtuoso | |
parent | 14afd33de16c0ee0705ce2cfdb06b3aff4e1b22e (diff) | |
download | bh20-seq-resource-986bacf77191a159d842605f6bb86f3f92a3be54.tar.gz bh20-seq-resource-986bacf77191a159d842605f6bb86f3f92a3be54.tar.lz bh20-seq-resource-986bacf77191a159d842605f6bb86f3f92a3be54.zip |
virtuoso: header change
Diffstat (limited to 'scripts/update_virtuoso')
-rwxr-xr-x | scripts/update_virtuoso/check_for_updates.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/update_virtuoso/check_for_updates.py b/scripts/update_virtuoso/check_for_updates.py index a63f4d1..fb66c2e 100755 --- a/scripts/update_virtuoso/check_for_updates.py +++ b/scripts/update_virtuoso/check_for_updates.py @@ -56,13 +56,14 @@ url = 'https://download.lugli.arvadosapi.com/c=lugli-4zz18-z513nlpqm03hpca/_/mer # curl --head https://download.lugli.arvadosapi.com/c=lugli-4zz18-z513nlpqm03hpca/_/mergedmetadata.ttl r = requests.head(url) print(r.headers) -print(r.headers['Last-Modified']) +if not no_cache: + print(r.headers['Last-Modified']) -# --- Convert/validate time stamp -# ValueError: time data 'Tue, 21 Apr 2020 23:47:43 GMT' does not match format '%a %b %d %H:%M:%S %Y' -last_modified_str = r.headers['Last-Modified'] -t_stamp = time.strptime(last_modified_str,"%a, %d %b %Y %H:%M:%S %Z" ) -print(t_stamp) + # --- Convert/validate time stamp + # ValueError: time data 'Tue, 21 Apr 2020 23:47:43 GMT' does not match format '%a %b %d %H:%M:%S %Y' + last_modified_str = r.headers['Last-Modified'] + t_stamp = time.strptime(last_modified_str,"%a, %d %b %Y %H:%M:%S %Z" ) + print(t_stamp) # OK, it works, now check last stored value in the cache stamp = None |