diff options
author | 2013-07-18 21:21:39 +0200 | |
---|---|---|
committer | 2013-07-18 21:21:39 +0200 | |
commit | 9929b385114c5bb3b06b446a8b8644dcf4e9695e (patch) | |
tree | 37bcd42c3ecb5bb4874f48e454b1f2629e9fb28f | |
parent | roverlay/util/mapread: has_context() (diff) | |
download | R_overlay-9929b385114c5bb3b06b446a8b8644dcf4e9695e.tar.gz R_overlay-9929b385114c5bb3b06b446a8b8644dcf4e9695e.tar.bz2 R_overlay-9929b385114c5bb3b06b446a8b8644dcf4e9695e.zip |
roverlay/interface/depres: try_compile_rules()
-rw-r--r-- | roverlay/interface/depres.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/roverlay/interface/depres.py b/roverlay/interface/depres.py index 181243f..6e79bc5 100644 --- a/roverlay/interface/depres.py +++ b/roverlay/interface/depres.py @@ -261,7 +261,7 @@ class DepresInterface ( roverlay.interface.generic.RoverlaySubInterface ): """ ret = self._resolver.get_reader().read ( files_or_dirs ) self.fixup_pool_id() - return ret + return True if ret is None else ret # --- end of load_rule_files (...) --- def add_rule ( self, rule_str ): @@ -310,6 +310,13 @@ class DepresInterface ( roverlay.interface.generic.RoverlaySubInterface ): return True # --- end of add_rule_list (...) --- + def try_compile_rules ( self, *args, **kwargs ): + if self._parser.has_context(): + return False + else: + return self.compile_rules() + # --- end of try_compile_rules (...) --- + def compile_rules ( self, new_pool=False ): """Tells the rule parser to 'compile' rules. This converts the text input into dependency rule objects, which are then added to a rule pool. |