[Tutor] Weird Try..Except Error
Nikunj.Badjatya at emc.com
Nikunj.Badjatya at emc.com
Fri Nov 25 12:43:21 CET 2011
Hi All,
Please look at the snippet below.
When I am running my module its giving me following error.
Using : Python 2.7, windows Env.
{{{
# User defined modules
try:
from scripts import precheck
from scripts import input
from scripts import validate
from scripts import logsetup
from scripts.constants import *
except ImportError, err_msg: ==> line 38
print("ERROR {0}".format(err_msg))
print("INFO Please verify the presence of above module, and restart the installation")
sys.exit(1)
}}}
{{{
Output:
C:\> install.py -f input.xml
File " C:\>install.py", line 38
except ImportError, err_msg:
^
SyntaxError: invalid syntax
}}}
I checked the comma and spacing and didn't find any problem.
Any idea.?
Thanks
Nikunj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111125/d3fbc602/attachment.html>
More information about the Tutor
mailing list