The SVN repository for pyang (googlecode) has the fix:
do the import first and then the "try:" clause, re-indenting
as needed. I filed a bug with them asking them to bump out
their next release. (libxml2 is apparently "nice", but not
required.) Thanks!
User Profile
Collapse
-
pyang chokes on UnboundLocalError
Does this mean that the pyang code should have the
"except ImportError:" before the "except libxml2.treeErr or" ? -- The stack follows the code fragment:
...Code:def validate_pattern_expr(errors, stmt): # check that it's syntactically correct try: import libxml2 re = libxml2.regexpCompile(stmt.arg) return (re, stmt.pos) except libxml2.treeError,
No activity results to display
Show More
Leave a comment: