[tor-commits] [ooni-probe/master] Don't reference deck_hash if it was not supplied

art at torproject.org art at torproject.org
Thu Sep 5 22:14:23 UTC 2013


commit f94db8679b6a8cb77bc9b25dd48f823f3418783f
Author: aagbsn <aagbsn at extc.org>
Date:   Thu Sep 5 10:58:35 2013 -0400

    Don't reference deck_hash if it was not supplied
---
 ooni/deck.py |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ooni/deck.py b/ooni/deck.py
index 3b0716c..36d88c6 100644
--- a/ooni/deck.py
+++ b/ooni/deck.py
@@ -77,9 +77,10 @@ class Deck(InputFile):
 
         cached_deck_dir = os.path.join(config.advanced.data_dir,
                 'decks')
-        cache_path = os.path.join(cached_deck_dir, deck_hash)
-        self.cached_file = cache_path
-        self.cached_descriptor = cache_path + '.desc'
+        if deck_hash:
+            cache_path = os.path.join(cached_deck_dir, deck_hash)
+            self.cached_file = cache_path
+            self.cached_descriptor = cache_path + '.desc'
  
         if deckFile: self.loadDeck(deckFile)
 





More information about the tor-commits mailing list