1 |
commit: 66b21d7afd3115f7b349078825d4a784aa4a2c4f |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Thu Aug 1 14:29:09 2013 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Thu Aug 1 14:30:17 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=66b21d7a |
7 |
|
8 |
package rule, bind no-op statement to BaseContext |
9 |
|
10 |
--- |
11 |
roverlay/packagerules/parser/context/action.py | 3 +-- |
12 |
roverlay/packagerules/parser/context/base.py | 2 ++ |
13 |
2 files changed, 3 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/roverlay/packagerules/parser/context/action.py b/roverlay/packagerules/parser/context/action.py |
16 |
index 49ed7db..febe88b 100644 |
17 |
--- a/roverlay/packagerules/parser/context/action.py |
18 |
+++ b/roverlay/packagerules/parser/context/action.py |
19 |
@@ -46,7 +46,6 @@ class RuleActionContext ( |
20 |
'trace', |
21 |
}) |
22 |
|
23 |
- KEYWORDS_NO_ACTION = frozenset ({ 'pass', 'null', }) |
24 |
|
25 |
# dict ( <keyword> => <evar class> ) |
26 |
# Dict of evar action keywords (with corresponding classes) |
27 |
@@ -227,7 +226,7 @@ class RuleActionContext ( |
28 |
Raises: |
29 |
* InvalidContext |
30 |
""" |
31 |
- if _str in self.KEYWORDS_NO_ACTION: |
32 |
+ if _str in self.KEYWORDS_NOP_STATEMENT: |
33 |
pass |
34 |
elif _str in self.KEYWORDS_ACTION_IGNORE: |
35 |
if not self._actions: |
36 |
|
37 |
diff --git a/roverlay/packagerules/parser/context/base.py b/roverlay/packagerules/parser/context/base.py |
38 |
index 9bd97b7..90f79b4 100644 |
39 |
--- a/roverlay/packagerules/parser/context/base.py |
40 |
+++ b/roverlay/packagerules/parser/context/base.py |
41 |
@@ -6,6 +6,8 @@ |
42 |
|
43 |
class BaseContext ( object ): |
44 |
|
45 |
+ KEYWORDS_NOP_STATEMENT = frozenset ({ 'pass', 'null', }) |
46 |
+ |
47 |
class InvalidContext ( Exception ): |
48 |
pass |
49 |
# --- end of InvalidContext --- |