mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
fix the KeyError bug in unique_service()
This commit is contained in:
parent
492c97ad31
commit
b063fdc1fb
@ -246,7 +246,7 @@ class ServiceRegistry(object):
|
|||||||
row, candidate),
|
row, candidate),
|
||||||
return_changes='always').run()
|
return_changes='always').run()
|
||||||
new_val = result['changes'][0]['new_val']
|
new_val = result['changes'][0]['new_val']
|
||||||
if all([new_val[k] == candidate[k] for k in candidate
|
if all([new_val.get(k) == candidate[k] for k in candidate
|
||||||
if k not in ('first_heartbeat', 'last_heartbeat')]):
|
if k not in ('first_heartbeat', 'last_heartbeat')]):
|
||||||
# candidate is the unique_service, send a heartbeat
|
# candidate is the unique_service, send a heartbeat
|
||||||
del candidate['first_heartbeat'] # don't touch first_heartbeat
|
del candidate['first_heartbeat'] # don't touch first_heartbeat
|
||||||
|
2
setup.py
2
setup.py
@ -3,7 +3,7 @@ import codecs
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='doublethink',
|
name='doublethink',
|
||||||
version='0.2.0.dev81',
|
version='0.2.0.dev82',
|
||||||
packages=['doublethink'],
|
packages=['doublethink'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user