diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-06-23 23:36:55 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-06-23 23:36:55 -0700 |
commit | 017ff1ff4398a9d7451a0e1ecc80dd98c58c40c7 (patch) | |
tree | 84c6d239d25a5e6450d58e1a7b1adb9ffad2c4e4 | |
parent | fada06f52260bc78ae38aebd558101b916cf934a (diff) | |
download | fedora-packager-017ff1ff4398a9d7451a0e1ecc80dd98c58c40c7.tar.gz fedora-packager-017ff1ff4398a9d7451a0e1ecc80dd98c58c40c7.tar.xz fedora-packager-017ff1ff4398a9d7451a0e1ecc80dd98c58c40c7.zip |
Add some logging to our process calls.
-rw-r--r-- | src/pyfedpkg/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 2ced0cc..821aaa0 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -88,6 +88,7 @@ def _run_command(cmd, shell=False, env=None): environ = os.environ if env: for item in env.keys(): + log.debug('Adding %s:%s to the environment' % (item, env[item])) environ[item] = env[item] # Check if we're supposed to be on a shell. If so, the command must # be a string, and not a list. @@ -96,6 +97,8 @@ def _run_command(cmd, shell=False, env=None): command = ' '.join(cmd) # Check to see if we're on a real tty, if so, stream it baby! if sys.stdout.isatty(): + log.debug('Running %s directly on the tty' % + subprocess.list2cmdline(cmd)) try: subprocess.check_call(command, env=environ, stdout=sys.stdout, stderr=sys.stderr, shell=shell) @@ -105,6 +108,8 @@ def _run_command(cmd, shell=False, env=None): raise FedpkgError() else: # Ok, we're not on a live tty, so pipe and log. + log.debug('Running %s and logging output' % + subprocess.list2cmdline(cmd)) try: proc = subprocess.Popen(command, env=environ, stdout=subprocess.PIPE, |