diff options
Diffstat (limited to 'contrib/sort.py')
-rwxr-xr-x | contrib/sort.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/sort.py b/contrib/sort.py index 595ad0536..5cd4045f0 100755 --- a/contrib/sort.py +++ b/contrib/sort.py | |||
@@ -102,15 +102,15 @@ def main(args): | |||
102 | exit_code = fix_profile(filename) | 102 | exit_code = fix_profile(filename) |
103 | else: | 103 | else: |
104 | fix_profile(filename) | 104 | fix_profile(filename) |
105 | except FileNotFoundError: | 105 | except FileNotFoundError as err: |
106 | print(f"[ Error ] Can't find `{filename}'", file=stderr) | 106 | print(f"[ Error ] {err}", file=stderr) |
107 | exit_code = 1 | 107 | exit_code = 1 |
108 | except PermissionError: | 108 | except PermissionError as err: |
109 | print(f"[ Error ] Can't read/write `{filename}'", file=stderr) | 109 | print(f"[ Error ] {err}", file=stderr) |
110 | exit_code = 1 | 110 | exit_code = 1 |
111 | except Exception as err: | 111 | except Exception as err: |
112 | print( | 112 | print( |
113 | f"[ Error ] An error occurred while processing `{filename}': {err}", | 113 | f"[ Error ] An error occurred while processing '{filename}': {err}", |
114 | file=stderr, | 114 | file=stderr, |
115 | ) | 115 | ) |
116 | exit_code = 1 | 116 | exit_code = 1 |