UI/SymbolsWidget.py

branch
6_1_x
changeset 4969
2e3bf59087ec
parent 4632
ca310db386ed
child 4972
fe8015457551
--- a/UI/SymbolsWidget.py	Sun Apr 24 14:19:17 2016 +0200
+++ b/UI/SymbolsWidget.py	Fri May 06 16:35:40 2016 +0200
@@ -9,16 +9,17 @@
 
 from __future__ import unicode_literals
 
-import sys
-import unicodedata
 try:
-    # Py3
-    import html.entities as html_entities
-except (ImportError):
     # Py2
     str = unicode                               # __IGNORE_WARNING__
     chr = unichr                                # __IGNORE_WARNING__
     import htmlentitydefs as html_entities      # __IGNORE_WARNING__
+except NameError:
+    # Py3
+    import html.entities as html_entities
+
+import sys
+import unicodedata
 
 from PyQt5.QtCore import pyqtSlot, pyqtSignal, QAbstractTableModel, \
     QModelIndex, Qt, qVersion, QItemSelectionModel, QLocale

eric ide

mercurial