summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/pysh/builtin.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/pysh/builtin.py')
-rw-r--r--bitbake/lib/bb/pysh/builtin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/pysh/builtin.py b/bitbake/lib/bb/pysh/builtin.py
index 25ad22eb74..b748e4a4f2 100644
--- a/bitbake/lib/bb/pysh/builtin.py
+++ b/bitbake/lib/bb/pysh/builtin.py
@@ -151,7 +151,7 @@ def builtin_trap(name, args, interp, env, stdin, stdout, stderr, debugflags):
151 for sig in args[1:]: 151 for sig in args[1:]:
152 try: 152 try:
153 env.traps[sig] = action 153 env.traps[sig] = action
154 except Exception, e: 154 except Exception as e:
155 stderr.write('trap: %s\n' % str(e)) 155 stderr.write('trap: %s\n' % str(e))
156 return 0 156 return 0
157 157
@@ -214,7 +214,7 @@ def utility_cat(name, args, interp, env, stdin, stdout, stderr, debugflags):
214 data = f.read() 214 data = f.read()
215 finally: 215 finally:
216 f.close() 216 f.close()
217 except IOError, e: 217 except IOError as e:
218 if e.errno != errno.ENOENT: 218 if e.errno != errno.ENOENT:
219 raise 219 raise
220 status = 1 220 status = 1
@@ -433,7 +433,7 @@ def utility_mkdir(name, args, interp, env, stdin, stdout, stderr, debugflags):
433 if option.has_p: 433 if option.has_p:
434 try: 434 try:
435 os.makedirs(path) 435 os.makedirs(path)
436 except IOError, e: 436 except IOError as e:
437 if e.errno != errno.EEXIST: 437 if e.errno != errno.EEXIST:
438 raise 438 raise
439 else: 439 else:
@@ -561,7 +561,7 @@ def utility_sort(name, args, interp, env, stdin, stdout, stderr, debugflags):
561 lines = f.readlines() 561 lines = f.readlines()
562 finally: 562 finally:
563 f.close() 563 f.close()
564 except IOError, e: 564 except IOError as e:
565 stderr.write(str(e) + '\n') 565 stderr.write(str(e) + '\n')
566 return 1 566 return 1
567 567
@@ -679,7 +679,7 @@ def run_command(name, args, interp, env, stdin, stdout,
679 p = subprocess.Popen([name] + args, cwd=env['PWD'], env=exec_env, 679 p = subprocess.Popen([name] + args, cwd=env['PWD'], env=exec_env,
680 stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 680 stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
681 out, err = p.communicate() 681 out, err = p.communicate()
682 except WindowsError, e: 682 except WindowsError as e:
683 raise UtilityError(str(e)) 683 raise UtilityError(str(e))
684 684
685 if not unixoutput: 685 if not unixoutput: