Only log debug output if there is content to log

This commit is contained in:
Jesse Keating 2007-08-15 22:14:46 -04:00 committed by Jesse Keating
parent 55d398b5b4
commit a83f26efbd

View File

@ -74,6 +74,7 @@ class Pungi(pypungi.PungiBase):
p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error, universal_newlines=True)
(out, err) = p1.communicate()
if out:
self.logger.debug(out)
if p1.returncode != 0:
@ -191,6 +192,7 @@ class Pungi(pypungi.PungiBase):
self.logger.error(err)
raise
if out:
self.logger.debug(out)
# Walk the tree for our files
@ -237,6 +239,7 @@ class Pungi(pypungi.PungiBase):
self.logger.info("Running splittree.")
output = timber.main()
if output:
self.logger.debug("Output from splittree: %s" % '\n'.join(output))
def doSplitSRPMs(self):