Page MenuHomePhabricator

No git doesn't mean it is Windows
Closed, DuplicatePublic

Description

I tried to run pywikibot in tools web server and got an error:

File "/shared/pywikipedia/core/pywikibot/version.py", line 134, in getversion_git
  except WindowsError:

NameError: global name 'WindowsError' is not defined

The problem comes from:

cmd = 'git'
 try:
     subprocess.Popen([cmd], stdout=subprocess.PIPE).communicate()
 except WindowsError:

The framework tries to call git, but /usr/bin is not in $PATH in tools web server; consequently, the calling fails. The error falls to except block, and obviously, tools server is not Windows; WindowsError is not defined, making NameError.


Version: core-(2.0)
Severity: normal

Details

Reference
bz61816

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:05 AM
bzimport set Reference to bz61816.
bzimport added a subscriber: Unknown Object (????).
  • This bug has been marked as a duplicate of bug 61231 ***