exit_status = 0
for target in targets:
if not os.path.isdir(target):
- print >> sys.stderr, target, 'is not a directory'
+ print >> sys.stderr, target, 'is not a directory!'
exit_status = 1
continue
+
top = os.path.realpath(target)
- proc_mounts = open('/proc/mounts', 'r')
+ try:
+ proc_mounts = open('/proc/mounts', 'r')
+ except IOError:
+ print >> sys.stdout, 'Cannot open /proc/mounts!'
+ sys.exit(1)
+
for line in proc_mounts:
_, point, fstype, _ = line.split(' ', 3)
point = mntent_unescape(point)