commit 892710c61039b3f2730997b562accf9bdaf62c12 Author: Tom Ritter tom@ritter.vg Date: Tue Dec 16 23:46:56 2014 -0500
Include full path for the download-stats file --- website.py | 2 +- write_website.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/website.py b/website.py index 4b20837..4279651 100755 --- a/website.py +++ b/website.py @@ -584,7 +584,7 @@ class WebsiteWriter: """ Write some download statistics. """ - f = open(os.path.join('out', 'download-stats.csv'), 'r') + f = open(os.path.join(os.path.dirname(__file__), 'out', 'download-stats.csv'), 'r') lines = f.readlines() f.close()
diff --git a/write_website.py b/write_website.py index 6316c0c..f445a8e 100755 --- a/write_website.py +++ b/write_website.py @@ -53,7 +53,7 @@ def main(): votes, vote_fetching_issues, vote_fetching_runtimes = get_votes()
# updates the download statistics file - f = open(os.path.join('out', 'download-stats.csv'), 'a') + f = open(os.path.join(os.path.dirname(__file__), 'out', 'download-stats.csv'), 'a') for ds in consensus_fetching_runtimes: f.write("%s,%i,%i\n" % (ds, time.time() * 1000, int(consensus_fetching_runtimes[ds] * 1000))) f.close()
tor-commits@lists.torproject.org