- Improved error reporting.
This commit is contained in:
parent
37b855d9ec
commit
4cab253e7c
@ -10,13 +10,22 @@
|
|||||||
# cElementTree module
|
# cElementTree module
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
# Check for cElementTree presence. Otherwise use ElementTree.
|
# Check for cElementTree presence. Otherwise use ElementTree.
|
||||||
useiter = True
|
useiter = True
|
||||||
try:
|
try:
|
||||||
import cElementTree
|
import cElementTree
|
||||||
except ImportError:
|
except ImportError:
|
||||||
useiter = False
|
useiter = False
|
||||||
from elementtree import ElementTree
|
try:
|
||||||
|
from elementtree import ElementTree
|
||||||
|
except ImportError:
|
||||||
|
print """
|
||||||
|
ERROR: Could not locate elementtree or cElementTree package.
|
||||||
|
Please install one of them in order to work with the Scyther python interface.
|
||||||
|
"""
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
## Simply pick cElementTree
|
## Simply pick cElementTree
|
||||||
#import cElementTree
|
#import cElementTree
|
||||||
@ -28,7 +37,6 @@ import Term
|
|||||||
import Attack
|
import Attack
|
||||||
import Trace
|
import Trace
|
||||||
import Claim
|
import Claim
|
||||||
import sys
|
|
||||||
|
|
||||||
class XMLReader(object):
|
class XMLReader(object):
|
||||||
|
|
||||||
|
@ -3,8 +3,16 @@
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
""" Import externals """
|
""" Import externals """
|
||||||
import wx
|
|
||||||
import sys
|
import sys
|
||||||
|
try:
|
||||||
|
import wx
|
||||||
|
except ImportError:
|
||||||
|
print """
|
||||||
|
ERROR: Could not find the required wxPython package.
|
||||||
|
Please install this package in order to use the graphical user
|
||||||
|
interface of Scyther.
|
||||||
|
"""
|
||||||
|
sys.exit(1)
|
||||||
import os
|
import os
|
||||||
from optparse import OptionParser, SUPPRESS_HELP
|
from optparse import OptionParser, SUPPRESS_HELP
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user