Skip to content

Commit

Permalink
bitcraze#433: Add python imports check
Browse files Browse the repository at this point in the history
  • Loading branch information
ataffanel committed Aug 19, 2020
1 parent 7c9c340 commit 81a45c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ build_script:
- cmd: >-
python setup.py build
build\exe.win32-3.6\cfclient.exe --check-imports
python win32install\generate_nsis.py
makensis win32install\cfclient.nsi
Expand Down
8 changes: 8 additions & 0 deletions src/cfclient/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def main():
parser.add_argument('--debug', '-d', nargs=1, default='info', type=str,
help="set debug level "
"[minimal, info, debug, debugfile]")
parser.add_argument('--check-imports', type=bool, default=False,
const=True, nargs="?",
help="Check python imports and exit successfully" +
" (intended for CI)")
args = parser.parse_args()
debug = args.debug

Expand Down Expand Up @@ -133,6 +137,10 @@ def main():
logger.info("Foundation not found. Menu will show python as "
"application name")

if args.check_imports:
logger.info("All imports successful!")
sys.exit(0)

# Start up the main user-interface
from .ui.main import MainUI
from PyQt5.QtWidgets import QApplication
Expand Down

0 comments on commit 81a45c3

Please sign in to comment.