[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Fix bug in filename generation
commit 4b4920256fd6f06349a578d6de9a2f0b343a903f
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Wed Aug 6 18:51:13 2014 +0200
Fix bug in filename generation
---
ooni/utils/__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ooni/utils/__init__.py b/ooni/utils/__init__.py
index f770c02..e879d7b 100644
--- a/ooni/utils/__init__.py
+++ b/ooni/utils/__init__.py
@@ -3,6 +3,7 @@ import random
import glob
import os
+from ooni import otime
from ooni import errors
@@ -27,7 +28,7 @@ class Storage(dict):
def __getattr__(self, key):
try:
return self[key]
- except KeyError, k:
+ except KeyError:
return None
def __setattr__(self, key, value):
@@ -117,6 +118,7 @@ def generate_filename(testDetails, prefix=None, extension=None, filename=None):
"""
if filename is None:
test_name, start_time = testDetails['test_name'], testDetails['start_time']
+ start_time = otime.epochToTimestamp(start_time)
suffix = "%s-%s" % (test_name, start_time)
basename = '%s-%s' % (prefix, suffix) if prefix is not None else suffix
final_filename = '%s.%s' % (basename, extension) if extension is not None else basename
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits