if tsk.__class__.stat: ret = tsk.__class__.stat(tsk)
# actual call to task's run() function
else: ret = tsk.call_run()
- except Exception, e:
+ except Exception as e:
tsk.err_msg = Utils.ex_stack()
tsk.hasrun = EXCEPTION
try:
st = tsk.runnable_status()
- except Exception, e:
+ except Exception as e:
self.processed += 1
if self.stop and not Options.options.keep:
tsk.hasrun = SKIPPED
ret = None
try:
ret = self.run_c_code(*k, **kw)
- except Configure.ConfigurationError, e:
+ except Configure.ConfigurationError as e:
self.check_message_2(kw['errmsg'], 'YELLOW')
if 'mandatory' in kw and kw['mandatory']:
if Logs.verbose > 1:
absdir = os.path.join(srcdir, dir)
try:
files = vcs_dir_contents(absdir)
- except Exception, e:
+ except Exception as e:
Logs.error('unable to get contents of %s: %s' % (absdir, e))
sys.exit(1)
add_files_to_tarball(tar, srcdir, dir, dist_base, destdir, blacklist, files)
try:
os.makedirs(destpath)
os.chmod(destpath, chmod)
- except OSError, e:
+ except OSError as e:
if not os.path.isdir(destpath):
raise Utils.WafError("Cannot create the folder '%s' (error: %s)" % (path, e))
Build.BuildContext.INSTALL_DIR = INSTALL_DIR