Merge pull request #167 from YunoHost/avoid_convertion_error

[fix] sometime we get an empty string
This commit is contained in:
Bram 2018-06-25 15:18:30 +02:00 committed by GitHub
commit ed4896b918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -500,7 +500,7 @@ class MoulinetteLock(object):
lock_pids = f.read().strip().split('\n')
# Make sure to convert those pids to integers
lock_pids = [int(pid) for pid in lock_pids]
lock_pids = [int(pid) for pid in lock_pids if pid.strip() != '']
return lock_pids