diff options
author | necoro <> | 2007-03-31 19:29:26 +0000 |
---|---|---|
committer | necoro <> | 2007-03-31 19:29:26 +0000 |
commit | 2d2f6823f5360a5287b4b19d035cad4a5611fa3a (patch) | |
tree | c108aee3dd9a34c1c7dbc68ed87ff4cc65078593 /portato.py | |
parent | 5138b1e23d34e0a72e0c2f4ae52256e14d825320 (diff) | |
download | portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.gz portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.bz2 portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.zip |
Allowed Plugins to have a menu
Diffstat (limited to '')
-rwxr-xr-x | portato.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 <necoro@necoro.net>""" % 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 <necoro@necoro.net>""" % VERSION sys.exit(1) run() + +if __name__ == "__main__": + main() |