https://bugzilla.wikimedia.org/show_bug.cgi?id=61846
Bug ID: 61846 Summary: version.py crashes on tool labs Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl CC: russblau@hotmail.com Web browser: --- Mobile Platform: ---
Russell Blau 2014-02-24 02:45:56 CET This just leads to a new error:
/usr/lib/python2.7/subprocess.py in _execute_child(self=<subprocess.Popen object>, args=['git.cmd', '--no-pager', 'log', '-1', '--pretty=format:"%ad|%an|%h|%H|%d"--abbrev-commit', '--date=iso'], executable='git.cmd', preexec_fn=None, close_fds=False, cwd='/shared/pywikipedia/rewrite', env=None, universal_newlines=False, startupinfo=None, creationflags=0, shell=False, p2cread=None, p2cwrite=None, c2pread=8, c2pwrite=9, errread=None, errwrite=None) 1247 if fd is not None: 1248 os.close(fd) => 1249 raise child_exception 1250 1251 child_exception = OSError(2, 'No such file or directory')
<type 'exceptions.OSError'>: [Errno 2] No such file or directory args = (2, 'No such file or directory') child_traceback = 'Traceback (most recent call last):\n File "/usr/...st)\nOSError: [Errno 2] No such file or directory\n' errno = 2 filename = None message = '' strerror = 'No such file or directory'
Basically, getversiondict() needs to be able to fail gracefully and return some kind of placeholder value if it isn't able to locate either a GIT or SVN version number, rather than throw an exception and stop the entire framework from executing.