Permalink
Browse files

different behaviour on different lxml versions? testing

  • Loading branch information...
1 parent 6dbce12 commit 9187cf5bf83753ff83c500d3d9d53224d74c03a6 @proycon committed Apr 6, 2013
Showing with 8 additions and 5 deletions.
  1. +8 −5 formats/folia.py
View
@@ -397,11 +397,14 @@ def makeelement(E, tagname, **kwargs):
if sys.version < '3':
try:
return E._makeelement(tagname.encode('utf-8'), **{ k.encode('utf-8'): v.encode('utf-8') for k,v in kwargs.items() } )
- except Exception as e:
- print(e,file=stderr)
- print("tagname=",tagname,file=stderr)
- print("kwargs=",kwargs,file=stderr)
- raise e
+ except ValueError as e:
+ try:
+ return E._makeelement(tagname,**kwargs)
+ except:
+ print(e,file=stderr)
+ print("tagname=",tagname,file=stderr)
+ print("kwargs=",kwargs,file=stderr)
+ raise e
else:
return E._makeelement(tagname,**kwargs)

0 comments on commit 9187cf5

Please sign in to comment.