From fba60a84b9a838ad32def950210a6b62d9bcdbff Mon Sep 17 00:00:00 2001 From: necoro <> Date: Mon, 19 Feb 2007 23:04:14 +0000 Subject: Back to our own revision solution as the eclass-one checks _before_ updating --- portato.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'portato.py') diff --git a/portato.py b/portato.py index 0d357ea..4db4b0e 100755 --- a/portato.py +++ b/portato.py @@ -16,11 +16,10 @@ from portato.constants import VERSION, FRONTENDS, STD_FRONTEND import sys if __name__ == "__main__": -# import pychecker.checker uimod = STD_FRONTEND - if len(sys.argv) > 1: - if sys.argv[1] in ("--help","--version","-h","-v"): + for arg in sys.argv[1:]: + if arg in ("--help","--version","-h","-v"): print """Portato %s Copyright (C) 2006-2007 René 'Necoro' Neumann This is free software. You may redistribute copies of it under the terms of @@ -29,8 +28,16 @@ There is NO WARRANTY, to the extent permitted by law. Written by René 'Necoro' Neumann """ % VERSION sys.exit(0) - else: - uimod = sys.argv[1] + + if arg == "--check": # run pychecker + import os + os.environ['PYCHECKER'] = "--limit 50" + import pychecker.checker + continue + + uimod = arg + break + if uimod in FRONTENDS: try: exec ("from portato.gui.%s import run" % uimod) -- cgit v1.2.3