Hello All,
Can someone please explain how is the following code fragment possible?
(If you're interested I can place the whole project somewhere).
def checkout(dest, log):
'''Get latest version from SCM
client - SCM client to use
dest - Destination directory
'''
try:
SCM.checkout(de st, log)
except SCMError, e:
raise NightlyError("C heckout")
except Exception, e:
import inspect
file = inspect.getsour cefile(e.__clas s__)
line = inspect.getsour celines(e.__cla ss__)[1]
print "%s:%d" % (file, line)
file = inspect.getsour cefile(SCMError )
line = inspect.getsour celines(SCMErro r)[1]
print "%s:%d" % (file, line)
print SCMError is e.__class__
raise SystemExit
I get to the second "except" clause, and the printout is:
/home/mikit/work/nightly/scm/common.py:3
/home/mikit/work/nightly/scm/common.py:3
False
How is this possible?
Bye.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka@zo ran.com>
The only difference between children and adults is the price of the toys
Can someone please explain how is the following code fragment possible?
(If you're interested I can place the whole project somewhere).
def checkout(dest, log):
'''Get latest version from SCM
client - SCM client to use
dest - Destination directory
'''
try:
SCM.checkout(de st, log)
except SCMError, e:
raise NightlyError("C heckout")
except Exception, e:
import inspect
file = inspect.getsour cefile(e.__clas s__)
line = inspect.getsour celines(e.__cla ss__)[1]
print "%s:%d" % (file, line)
file = inspect.getsour cefile(SCMError )
line = inspect.getsour celines(SCMErro r)[1]
print "%s:%d" % (file, line)
print SCMError is e.__class__
raise SystemExit
I get to the second "except" clause, and the printout is:
/home/mikit/work/nightly/scm/common.py:3
/home/mikit/work/nightly/scm/common.py:3
False
How is this possible?
Bye.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka@zo ran.com>
The only difference between children and adults is the price of the toys
Comment