Ignore:
Timestamp:
08/13/06 09:46:20 (8 years ago)
Author:
xi
Message:

Completely rewrite the libyaml bindings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/resolver.py

    r222 r223  
    7575 
    7676    def descend_resolver(self, current_node, current_index): 
     77        if not self.yaml_path_resolvers: 
     78            return 
    7779        exact_paths = {} 
    7880        prefix_paths = [] 
     
    9698 
    9799    def ascend_resolver(self): 
     100        if not self.yaml_path_resolvers: 
     101            return 
    98102        self.resolver_exact_paths.pop() 
    99103        self.resolver_prefix_paths.pop() 
     
    132136                    return tag 
    133137            implicit = implicit[1] 
    134         exact_paths = self.resolver_exact_paths[-1] 
    135         if kind in exact_paths: 
    136             return exact_paths[kind] 
    137         if None in exact_paths: 
    138             return exact_paths[None] 
     138        if self.yaml_path_resolvers: 
     139            exact_paths = self.resolver_exact_paths[-1] 
     140            if kind in exact_paths: 
     141                return exact_paths[kind] 
     142            if None in exact_paths: 
     143                return exact_paths[None] 
    139144        if kind is ScalarNode: 
    140145            return self.DEFAULT_SCALAR_TAG 
Note: See TracChangeset for help on using the changeset viewer.