summaryrefslogtreecommitdiffstats
path: root/kspread/plugins/scripting/scripts/exporthtml
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/plugins/scripting/scripts/exporthtml')
-rwxr-xr-xkspread/plugins/scripting/scripts/exporthtml/ExportHtml.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
index d38771fc8..7d308ab2d 100755
--- a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
+++ b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
@@ -18,7 +18,7 @@ import os, sys
try:
from TQt import qt
except (ImportError):
- raise "Failed to import the required PyTQt python module."
+ raise Exception("Failed to import the required PyTQt python module.")
class Dialog(tqt.QDialog):
def __init__(self, scriptpath, parent):
@@ -69,7 +69,7 @@ class Dialog(tqt.QDialog):
stylebox.setSpacing(6)
stylelabel = qt.TQLabel("Style:",stylebox)
self.stylecombo = qt.TQComboBox(stylebox)
- stylenames = self.styles.keys()
+ stylenames = list(self.styles.keys())
stylenames.sort()
for stylename in stylenames:
self.stylecombo.insertItem(stylename)
@@ -123,12 +123,13 @@ class Dialog(tqt.QDialog):
sheetname = str( self.sheetcombo.currentText() )
sheet = self.doc.sheetByName( sheetname )
- print "sheetname=%s sheet=%s" % (sheetname,sheet)
+ print("sheetname=%s sheet=%s" % (sheetname,sheet))
filename = str( self.fileedit.text() )
try:
file = open(filename, "w")
- except IOError, (errno, strerror):
+ except IOError as xxx_todo_changeme:
+ (errno, strerror) = xxx_todo_changeme.args
qt.TQMessageBox.critical(self,"Error","<qt>Failed to create HTML file \"%s\"<br><br>%s</qt>" % (filename,strerror))
return