mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
pylint: Reenable R1722 consider-using-sys-exit
* R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
This commit is contained in:
parent
1fbfae355a
commit
a4c1ca48ad
4 changed files with 10 additions and 9 deletions
|
|
@ -7,6 +7,7 @@ import os
|
|||
import re
|
||||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
from colorama import Fore, Style
|
||||
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ with open('fdroidserver/common.py') as fp:
|
|||
|
||||
to_compile = re.search(r'\nNDKS = [^\]]+\]', common_py).group()
|
||||
if not to_compile:
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
code = compile(to_compile, '<string>', 'exec')
|
||||
config = {}
|
||||
exec(code, None, config) # nosec this is just a CI script
|
||||
|
|
@ -78,7 +79,7 @@ with open('fdroidserver/common.py', 'w') as fp:
|
|||
if os.getenv('CI_PROJECT_NAMESPACE') != 'fdroid':
|
||||
p = subprocess.run(['git', '--no-pager', 'diff'])
|
||||
print(p.stdout)
|
||||
exit(errors)
|
||||
sys.exit(errors)
|
||||
|
||||
|
||||
# This only runs after commits are pushed to fdroid/fdroidserver
|
||||
|
|
@ -114,7 +115,7 @@ if git_repo.is_dirty() and 'fdroidserver/common.py' in modified:
|
|||
+ 'ERROR: GitLab Token not found in PERSONAL_ACCESS_TOKEN!'
|
||||
+ Style.RESET_ALL
|
||||
)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
gl = gitlab.Gitlab(
|
||||
os.getenv('CI_SERVER_URL'), api_version=4, private_token=private_token
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue