diff options
| author | Christophe Fergeau <cfergeau@redhat.com> | 2011-05-19 15:59:07 +0200 |
|---|---|---|
| committer | Alon Levy <alevy@redhat.com> | 2011-07-21 15:09:28 +0300 |
| commit | b759a52fcdf18334b03555840fa23e9b7b9d5db5 (patch) | |
| tree | 90be7f2c4a24d289731d9529bb29f4e97264dfc6 /python_modules | |
| parent | e482c1f640e397dfb277900873400015884adb1b (diff) | |
| download | spice-b759a52fcdf18334b03555840fa23e9b7b9d5db5.tar.gz spice-b759a52fcdf18334b03555840fa23e9b7b9d5db5.tar.xz spice-b759a52fcdf18334b03555840fa23e9b7b9d5db5.zip | |
add check for pyparsing
Check both in configure.ac (after checking if we need to rebuild
the marshalling files) and in the python script using pyparsing
(for people modifying .proto files in tarballs)
Diffstat (limited to 'python_modules')
| -rw-r--r-- | python_modules/spice_parser.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py index 43e930c5..1d775bfa 100644 --- a/python_modules/spice_parser.py +++ b/python_modules/spice_parser.py @@ -1,6 +1,11 @@ -from pyparsing import Literal, CaselessLiteral, Word, OneOrMore, ZeroOrMore, \ - Forward, delimitedList, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, \ - alphanums, ParseException, ParseResults, Keyword, StringEnd, replaceWith +try: + from pyparsing import Literal, CaselessLiteral, Word, OneOrMore, ZeroOrMore, \ + Forward, delimitedList, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, \ + alphanums, ParseException, ParseResults, Keyword, StringEnd, replaceWith +except ImportError: + print "Module pyparsing not found." + exit(1) + import ptypes import sys |
