From ee7254ddbee1d40ddcd33b7c2c92580fb1a850c7 Mon Sep 17 00:00:00 2001 From: Ade Date: Sat, 24 Jun 2017 09:12:17 +1200 Subject: [PATCH] Version check logging --- headphones/versioncheck.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/headphones/versioncheck.py b/headphones/versioncheck.py index 341f7926..11c4e225 100644 --- a/headphones/versioncheck.py +++ b/headphones/versioncheck.py @@ -39,14 +39,15 @@ def runGit(args): try: logger.debug('Trying to execute: "' + cmd + '" with shell in ' + headphones.PROG_DIR) - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, + p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + shell=True, cwd=headphones.PROG_DIR) output, err = p.communicate() output = output.strip() logger.debug('Git output: ' + output) - except OSError: - logger.debug('Command failed: %s', cmd) + except OSError as e: + logger.debug('Command failed: %s. Error: %s' % (cmd, e)) continue if 'not found' in output or "not recognized as an internal or external command" in output: