User Profile

Collapse

Profile Sidebar

Collapse
Bruce Korb
Bruce Korb
Last Activity: Sep 1 '10, 04:21 PM
Joined: Sep 1 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Bruce Korb
    replied to pyang chokes on UnboundLocalError
    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!
    See more | Go to post

    Leave a comment:


  • Bruce Korb
    started a topic pyang chokes on UnboundLocalError

    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,
    ...
    See more | Go to post
No activity results to display
Show More
Working...