Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/107006
Change subject: (bug 59963) ignore git not found errors ...................................................................... (bug 59963) ignore git not found errors By calling 'git' directly instead of via a shell, an Exception is raised instead of an error being printed. Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099 --- M pywikibot/version.py 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/06/107006/1 diff --git a/pywikibot/version.py b/pywikibot/version.py index 6dd9514..d386568 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -124,14 +124,12 @@ tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4]) info = subprocess.Popen('git --no-pager log --pretty=format:"%ad|%an|%h|%H|%d" --abbrev-commit --date=iso -1', cwd=_program_dir, - shell=True, stdout=subprocess.PIPE).stdout.read() info = info.split('|') date = info[0][:-6] date = time.strptime(date, '%Y-%m-%d %H:%M:%S') rev = subprocess.Popen('git rev-list HEAD', cwd=_program_dir, - shell=True, stdout=subprocess.PIPE).stdout.read() rev = len(rev.splitlines()) hsh = info[3] # also stored in '.git/refs/heads/master' -- To view, visit https://gerrit.wikimedia.org/r/107006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide8b1c5407ce58243ac4615ae450e0ccf5132099 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen <valhall...@arctus.nl> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits