summaryrefslogtreecommitdiffstats
path: root/python_modules
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-05-19 15:59:07 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-06-22 16:24:32 +0200
commitdf95fc65fb882e01202116f997afe330b8475b88 (patch)
treee19e8b95a1371f5185cde9acbd315d1d2785c801 /python_modules
parent0400769de16ca2ed01270d780e670129a26ef6a2 (diff)
downloadspice-df95fc65fb882e01202116f997afe330b8475b88.tar.gz
spice-df95fc65fb882e01202116f997afe330b8475b88.tar.xz
spice-df95fc65fb882e01202116f997afe330b8475b88.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.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py
index 4c8a57a6..e20e8fc1 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