From 2d2f6823f5360a5287b4b19d035cad4a5611fa3a Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 31 Mar 2007 19:29:26 +0000 Subject: Allowed Plugins to have a menu --- portato.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'portato.py') diff --git a/portato.py b/portato.py index 4db4b0e..3a81dec 100755 --- a/portato.py +++ b/portato.py @@ -15,7 +15,7 @@ from portato.constants import VERSION, FRONTENDS, STD_FRONTEND import sys -if __name__ == "__main__": +def main (): uimod = STD_FRONTEND for arg in sys.argv[1:]: @@ -41,8 +41,8 @@ Written by René 'Necoro' Neumann """ % VERSION if uimod in FRONTENDS: try: exec ("from portato.gui.%s import run" % uimod) - except ImportError: - print "'%s' should be installed, but cannot be imported. This is definitly a bug." % uimod + except ImportError, e: + print "'%s' should be installed, but cannot be imported. This is definitly a bug. (%s)" % (uimod, e[0]) sys.exit(1) else: print ("Unknown interface '%s'. Correct interfaces are:" % uimod) , @@ -52,3 +52,6 @@ Written by René 'Necoro' Neumann """ % VERSION sys.exit(1) run() + +if __name__ == "__main__": + main() -- cgit v1.2.3