[dia] PyDia: improve error reporting for plug-ins with import failure



commit f9c767e4a823b375a922411d0413d604ec5cecf0
Author: Hans Breuer <hans breuer org>
Date:   Sun Jun 30 17:32:20 2013 +0200

    PyDia: improve error reporting for plug-ins with import failure

 plug-ins/python/python-startup.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/python/python-startup.py b/plug-ins/python/python-startup.py
index 86f343a..9883724 100644
--- a/plug-ins/python/python-startup.py
+++ b/plug-ins/python/python-startup.py
@@ -16,8 +16,8 @@ def load(plugindir):
                                try:
                                        __import__(file[:-3])
                                        loaded.append(file[:-3])
-                               except:
-                                       sys.stderr.write('could not import %s\n' % file)
+                               except Exception as e:
+                                       sys.stderr.write('could not import %s [%s]\n' % (file, e))
 
 # import any python plugins from the user ...
 if not os.environ.has_key('HOME'):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]