diff options
Diffstat (limited to 'Tools/scripts/which.py')
-rwxr-xr-x | Tools/scripts/which.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/scripts/which.py b/Tools/scripts/which.py index df54ce0..49b69ac 100755 --- a/Tools/scripts/which.py +++ b/Tools/scripts/which.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /usr/bin/env python # Variant of "which". # On stderr, near and total misses are reported. @@ -29,15 +29,15 @@ def main(): filename = os.path.join(dir, prog) try: st = os.stat(filename) - except OSError: + except os.error: continue if not S_ISREG(st[ST_MODE]): msg(filename + ': not a disk file') else: mode = S_IMODE(st[ST_MODE]) - if mode & 0o111: + if mode & 0111: if not ident: - print(filename) + print filename ident = st[:3] else: if st[:3] == ident: |