changeset 882:c26ec5ea9b9a

minor fixes
author Jeff Hammel <k0scist@gmail.com>
date Wed, 05 Aug 2020 09:20:51 -0700
parents 4ebb6aff9d67
children 3b7f67021877
files .gitignore python/html2flux.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.gitignore	Tue Aug 06 14:22:00 2019 -0700
+++ b/.gitignore	Wed Aug 05 09:20:51 2020 -0700
@@ -3,6 +3,5 @@
 *.egg-info
 *.swp
 *~
-build
 dist
 #*
\ No newline at end of file
--- 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() ])