Browse Source

Always cast pid read from wallet lockfile to int

master
Kristaps Kaupe 4 years ago
parent
commit
c20655cfbb
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  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