Revision: 4312 Author: russblau Date: 2007-09-16 22:36:47 +0000 (Sun, 16 Sep 2007)
Log Message: ----------- Shortening output of filename, by request.
Modified Paths: -------------- trunk/pywikipedia/copyright.py
Modified: trunk/pywikipedia/copyright.py =================================================================== --- trunk/pywikipedia/copyright.py 2007-09-16 21:08:12 UTC (rev 4311) +++ trunk/pywikipedia/copyright.py 2007-09-16 22:36:47 UTC (rev 4312) @@ -256,7 +256,11 @@ else: file_age = time.time() - os.path.getmtime(path) if file_age > 24 * 60 * 60: - print 'Updating file '%s' (%s)' % (path, page.aslink()) + short_path = path + if path.startswith(wikipedia.config.base_dir): + short_path = path[len(wikipedia.config.base_dir) + +len(os.path.sep) : ] + print 'Updating file '%s' (%s)' % (short_path, page.aslink()) force_update = True except OSError: raise