diff options
Diffstat (limited to 'kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py')
-rwxr-xr-x | kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py b/kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py index 89a60301..cb4e0de7 100755 --- a/kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py +++ b/kexi/plugins/scripting/scripts/projectdocumentor/ProjectDocumentor.py @@ -20,7 +20,7 @@ class DataProvider: try: self.connection = keximainwindow.getConnection() except: - raise "No connection established. Please open the project to be documented first." + raise Exception("No connection established. Please open the project to be documented first.") def printConnection(self): condata = self.connection.data() @@ -96,7 +96,7 @@ class GuiApp: try: import gui except: - raise "Import of the Kross GUI module failed." + raise Exception("Import of the Kross GUI module failed.") self.dialog = gui.Dialog("Project Documentor") @@ -130,7 +130,7 @@ class GuiApp: def toHTML(self, value): import types result = "" - if isinstance(value, types.TupleType): + if isinstance(value, tuple): result += "<ul>" if len(value) == 1: result += "<li>%s</li>" % value @@ -142,7 +142,7 @@ class GuiApp: if i != "": result += "<li>%s</li>" % i result += "</ul>" - elif isinstance(value, types.ListType): + elif isinstance(value, list): for item in value: result += "%s" % self.toHTML(item) else: @@ -151,7 +151,7 @@ class GuiApp: def doSave(self): file = str( self.file.get() ) - print "Attempting to save project documentation to file: %s" % file + print("Attempting to save project documentation to file: %s" % file) f = open(file, "w") @@ -167,19 +167,19 @@ class GuiApp: for d in dir(self.dataprovider): if d.startswith("print"): - print "GuiApp.doSave() CHECK %s" % d + print("GuiApp.doSave() CHECK %s" % d) a = self.printCheckBoxes[d] if a and a.isChecked(): - print "GuiApp.doSave() BEGIN %s" % d + print("GuiApp.doSave() BEGIN %s" % d) value = getattr(self.dataprovider,d)() if value != None and len(value) > 0: f.write("<h2>%s</h2>" % d[5:]) f.write( self.toHTML(value) ) - print "GuiApp.doSave() END %s" % d + print("GuiApp.doSave() END %s" % d) f.close() - print "Successfully saved project documentation to file: %s" % file + print("Successfully saved project documentation to file: %s" % file) self.dialog.close() GuiApp( DataProvider() ) |