Commit 5183b2cd authored by Jan Miksik's avatar Jan Miksik
Browse files

Merge branch 'hotfix/lxd-utils-permision' into 'master'

nsfarm/lxd/utils: fix PermissionError on container clean

See merge request !37
parents 627357cf aaaca103
......@@ -79,7 +79,9 @@ def clean_containers(dry_run=False):
try:
os.kill(pid, 0)
except OSError as err:
if (err.errno != 3): # 3 == ESRCH: No such process
if err.errno == 1: # 1 == EPERM: Process is running under different user
continue
if err.errno != 3: # 3 == ESRCH: No such process
raise
removed.append(cont.name)
if not dry_run:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment