summaryrefslogtreecommitdiff
path: root/portato.py
diff options
context:
space:
mode:
authornecoro <>2007-03-31 19:29:26 +0000
committernecoro <>2007-03-31 19:29:26 +0000
commit2d2f6823f5360a5287b4b19d035cad4a5611fa3a (patch)
treec108aee3dd9a34c1c7dbc68ed87ff4cc65078593 /portato.py
parent5138b1e23d34e0a72e0c2f4ae52256e14d825320 (diff)
downloadportato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.gz
portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.bz2
portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.zip
Allowed Plugins to have a menu
Diffstat (limited to '')
-rwxr-xr-xportato.py9
1 files changed, 6 insertions, 3 deletions
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 <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()