Ignore Python processes owned by other users when finding mount points. #273 (#289)

This commit is contained in:
Manuel Riel 2019-06-11 08:19:49 +08:00 committed by GitHub
parent 2b612d5142
commit 3aa3d96360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -245,8 +245,9 @@ def get_mount_points(repo_url):
mount_point = proc.cmdline()[idx + 1]
mount_points[archive_name] = mount_point
break
except psutil.ZombieProcess:
except (psutil.ZombieProcess, psutil.AccessDenied):
# Getting process details may fail (e.g. zombie process on macOS)
# or because the process is owned by another user.
# Also see https://github.com/giampaolo/psutil/issues/783
continue