diff python/html2flux.py @ 882:c26ec5ea9b9a

minor fixes
author Jeff Hammel <k0scist@gmail.com>
date Wed, 05 Aug 2020 09:20:51 -0700
parents fbfc02ea7d8e
children 3b7f67021877
line wrap: on
line diff
--- a/python/html2flux.py	Tue Aug 06 14:22:00 2019 -0700
+++ b/python/html2flux.py	Wed Aug 05 09:20:51 2020 -0700
@@ -50,7 +50,12 @@
 from lxml import etree
 from lsex import lsex # local import
 
-string = (str, unicode)
+try:
+    # python2
+    string = (str, unicode)
+except NameError:
+    # python3
+    string = (str,)
 
 # available executables
 executables = set([os.path.basename(i) for i in lsex() ])