pylint: Reenable R1722 consider-using-sys-exit

* R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
This commit is contained in:
FestplattenSchnitzel 2023-03-05 14:38:42 +01:00 committed by Hans-Christoph Steiner
parent 1fbfae355a
commit a4c1ca48ad
4 changed files with 10 additions and 9 deletions

View file

@ -91,7 +91,7 @@ with open('buildserver/Vagrantfile') as fp:
m = re.search(r"""\.vm\.box\s*=\s*["'](.*)["']""", fp.read())
if not m:
logging.error('Cannot find box name in buildserver/Vagrantfile!')
exit(1)
sys.exit(1)
config['basebox'] = m.group(1)
config['basebox_version'] = BASEBOX_VERSION_DEFAULT
config['cachedir'] = os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver')
@ -107,7 +107,7 @@ elif os.path.exists('makebs.config.py'):
if show_config_deprecation:
logging.error('Config is via %s and command line flags.' % configfile)
parser.print_help()
exit(1)
sys.exit(1)
logging.debug("Vagrantfile.yaml parsed -> %s", json.dumps(config, indent=4, sort_keys=True))
@ -264,7 +264,7 @@ def main():
logging.debug('found \'vmx\' or \'svm\' in /proc/cpuinfo -> hwvirtex = \'on\'')
else:
logging.error('hwvirtex = \'on\' and no \'vmx\' or \'svm\' found in /proc/cpuinfo!')
exit(1)
sys.exit(1)
serverdir = os.path.join(os.getcwd(), 'buildserver')
logfilename = os.path.join(serverdir, 'up.log')