adding a simulation mode
John Gordon
gordon at panix.com
Thu Jul 12 09:56:56 EDT 2012
In <mailman.2039.1342099220.4697.python-list at python.org> andrea crotti <andrea.crotti.0 at gmail.com> writes:
> try:
> copytree('sjkdf', 'dsflkj')
> Popen(['notfouhd'], shell=True)
> except Exception as e:
> print("here")
> behaves differently from:
> try:
> Popen(['notfouhd'], shell=True)
> copytree('sjkdf', 'dsflkj')
> except Exception as e:
> print("here")
> because if copytree fails it quits anyway.
> I also looked at the code but can't quite get why.. any idea?
copytree() could contain a call to sys.exit(), although that seems like
a rude thing to do.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list