mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user