mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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:
|
try:
|
||||||
return self._opener(args, **opts)
|
return self._opener(args, **opts)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
stream = e.stderr if e.stderr else e.stdout if e.stdout else ''
|
stream = e.stderr if e.stderr else e.stdout
|
||||||
_logger.error("git call error%s%s", stream and ': ', stream)
|
if stream:
|
||||||
|
_logger.error("git call error: %s", stream)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def stdout(self, flag=True):
|
def stdout(self, flag=True):
|
||||||
|
Loading…
Reference in New Issue
Block a user