mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
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:
parent
42912e1ac8
commit
0c2e7fd841
3 changed files with 39 additions and 28 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue