Skip to content

Commit 88807b3

Browse files
authored
Merge pull request #1379 from vil02/resolve_consider-using-sys-exit
Resolve `consider-using-sys-exit`
2 parents 4e8a70e + b5eb0ac commit 88807b3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rpmlint/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def process_lint_args(argv):
9999
# make sure rpmlintrc exists
100100
if options.rpmlintrc and not options.rpmlintrc.exists():
101101
print_warning(f"User specified rpmlintrc '{options.rpmlintrc}' does not exist")
102-
exit(2)
102+
sys.exit(2)
103103
# validate all the rpmlfile options to be either file or folder
104104
f_path = set()
105105
invalid_path = False
@@ -120,7 +120,7 @@ def process_lint_args(argv):
120120
f_path.update(p_path)
121121

122122
if invalid_path:
123-
exit(2)
123+
sys.exit(2)
124124
# convert options to dict
125125
options_dict = vars(options)
126126
# use computed rpmfile
@@ -149,7 +149,7 @@ def _validate_conf_location(string):
149149
if not path.exists():
150150
print_warning(
151151
f"File or dir with user specified configuration '{string}' does not exist")
152-
exit(2)
152+
sys.exit(2)
153153

154154
if path.is_dir():
155155
config_paths.extend(path.glob('*.toml'))

0 commit comments

Comments
 (0)