Browse Source

Merge #950: Always cast pid read from wallet lockfile to int

master
undeath 4 years ago
parent
commit
1801b9bd35
No known key found for this signature in database
GPG Key ID: F0DF5443BD2F3520
  1. 5
      jmclient/jmclient/storage.py

5
jmclient/jmclient/storage.py

@ -287,7 +287,10 @@ class Storage(object):
self._lock_file = lock_filename
if os.path.exists(self._lock_file):
with open(self._lock_file, 'r') as f:
locked_by_pid = f.read()
try:
locked_by_pid = int(f.read())
except ValueError:
locked_by_pid = None
self._lock_file = None
raise RetryableStorageError(
"File is currently in use (locked by pid {}). "

Loading…
Cancel
Save