mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] forwardport: avoid logging git error if there's no stream data
If no stream data was captured (no stderr and no stdout), would just log git call error: as error, with no further information. Don't do that if we have neither stderr nor stdout data, since we're re-raising the exception anyway, it's just confusing.
This commit is contained in:
parent
22c3406659
commit
13f239826e
@ -1146,8 +1146,9 @@ class Repo:
|
||||
try:
|
||||
return self._opener(args, **opts)
|
||||
except subprocess.CalledProcessError as e:
|
||||
stream = e.stderr if e.stderr else e.stdout if e.stdout else ''
|
||||
_logger.error("git call error%s%s", stream and ': ', stream)
|
||||
stream = e.stderr if e.stderr else e.stdout
|
||||
if stream:
|
||||
_logger.error("git call error: %s", stream)
|
||||
raise
|
||||
|
||||
def stdout(self, flag=True):
|
||||
|
Loading…
Reference in New Issue
Block a user