[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] move write() out of the scope of an IOError catch clause not meant for it
commit 92379c18388b9438a5affec452f0855fef087a32
Author: Darius Bacon <darius@xxxxxx>
Date: Wed Apr 16 12:00:10 2014 -0700
move write() out of the scope of an IOError catch clause not meant for it
---
oonib/deck/handlers.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/oonib/deck/handlers.py b/oonib/deck/handlers.py
index 44ff24f..8f30bfd 100644
--- a/oonib/deck/handlers.py
+++ b/oonib/deck/handlers.py
@@ -21,16 +21,15 @@ class DeckDescHandler(OONIBHandler):
deckDesc = yaml.safe_load(f)
for k in ['name', 'description', 'version', 'author', 'date']:
response[k] = deckDesc[k]
- self.write(response)
-
except IOError:
log.err("Deck %s missing" % deckID)
raise e.MissingDeck
-
except KeyError:
log.err("Deck %s missing required keys!" % deckID)
raise e.MissingDeckKeys
+ self.write(response)
+
class DeckListHandler(OONIBHandler):
def get(self):
if not config.main.deck_dir:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits