Revision: 8460 Author: purodha Date: 2010-08-26 10:54:49 +0000 (Thu, 26 Aug 2010)
Log Message: ----------- version.py was looking in wrong directory for .svn/entries which only exists in the program source directory, if at all. Was searching in the data directory given by the -dir: parameter. Corrected.
Modified Paths: -------------- trunk/pywikipedia/version.py
Modified: trunk/pywikipedia/version.py =================================================================== --- trunk/pywikipedia/version.py 2010-08-26 10:50:35 UTC (rev 8459) +++ trunk/pywikipedia/version.py 2010-08-26 10:54:49 UTC (rev 8460) @@ -9,7 +9,6 @@ import os import time import sys -import wikipediatools import config
cache = None @@ -47,7 +46,10 @@ return cache
def getversion_svn(): - entries = open(os.path.join(wikipediatools.get_base_dir(), '.svn/entries')) + _program_dir = os.path.normpath(os.path.dirname(sys.argv[0])) +# if not os.path.isabs(_program_dir): +# _program_dir = os.path.normpath(os.path.join(os.getcwd(), _program_dir)) + entries = open(os.path.join(_program_dir, '.svn/entries')) for i in range(4): entries.readline() tag = entries.readline().strip()
pywikipedia-svn@lists.wikimedia.org