made missing cli tools non fatal (#37194)

* made missing cli tools non fatal

* remove bare exceptions

these shoudl not be there as they can prevent 'wanted' exits
This commit is contained in:
Brian Coca 2018-04-10 17:23:29 -04:00 committed by GitHub
parent 42912e1ac8
commit 0c2e7fd841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 28 deletions

View file

@ -20,7 +20,7 @@ def is_chroot():
# check if my file system is the root one
proc_root = os.stat('/proc/1/root/.')
is_chroot = my_root.st_ino != proc_root.st_ino or my_root.st_dev != proc_root.st_dev
except:
except Exception:
# I'm not root or no proc, fallback to checking it is inode #2
is_chroot = (my_root.st_ino != 2)