Skip to content

Commit

Permalink
Ensure logging does not fail too #469
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Aug 10, 2018
1 parent 4f33faf commit 8d04aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commoncode/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def execute2(cmd_loc, args, lib_dir=None, cwd=None, env=None, to_files=False):
proc = subprocess.Popen(full_cmd, **pargs)
stdout, stderr = proc.communicate()
rc = proc.returncode if proc else 0
except:
except Exception as e:
tb = traceback.format_exc()
logger.debug('Command failed: %(full_cmd)r\n%(e)r\n%(tb)s' % locals())
logger.debug('Command failed: stdout: %(sop)r: ' % locals()+ repr(exists(sop)))
Expand Down

0 comments on commit 8d04aa3

Please sign in to comment.