mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Version check logging
This commit is contained in:
@@ -39,14 +39,15 @@ def runGit(args):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
logger.debug('Trying to execute: "' + cmd + '" with shell in ' + headphones.PROG_DIR)
|
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)
|
cwd=headphones.PROG_DIR)
|
||||||
output, err = p.communicate()
|
output, err = p.communicate()
|
||||||
output = output.strip()
|
output = output.strip()
|
||||||
|
|
||||||
logger.debug('Git output: ' + output)
|
logger.debug('Git output: ' + output)
|
||||||
except OSError:
|
except OSError as e:
|
||||||
logger.debug('Command failed: %s', cmd)
|
logger.debug('Command failed: %s. Error: %s' % (cmd, e))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if 'not found' in output or "not recognized as an internal or external command" in output:
|
if 'not found' in output or "not recognized as an internal or external command" in output:
|
||||||
|
|||||||
Reference in New Issue
Block a user