avoid undefined variable in log_output exception handler

This commit is contained in:
Mike McLean 2010-11-09 15:08:51 -05:00
parent 5d5537ec5e
commit 55e3a719d1

View file

@ -72,6 +72,7 @@ def log_output(session, path, args, outfile, uploadpath, cwd=None, logerror=0, a
"""Run command with output redirected. If chroot is not None, chroot to the directory specified
before running the command."""
pid = os.fork()
fd = None
if not pid:
session._forget()
try: