[tor-commits] [ooni-probe/master] Fix bug in converting failure to string
art at torproject.org
art at torproject.org
Fri Apr 29 09:42:26 UTC 2016
commit 250d86d5247463447f3abf0607c1c6bf0997c9a8
Author: Arturo Filastò <arturo at filasto.net>
Date: Thu Apr 14 22:42:49 2016 +0200
Fix bug in converting failure to string
---
ooni/errors.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ooni/errors.py b/ooni/errors.py
index e523de0..f98a09f 100644
--- a/ooni/errors.py
+++ b/ooni/errors.py
@@ -78,11 +78,9 @@ def failureToString(failure):
for failure_type, failure_string in known_failures:
if isinstance(failure.value, failure_type):
- if failure_string:
- return failure_string
- else:
- # Failure without a corresponding failure message
- return 'unknown_failure %s' % str(failure.value)
+ return failure_string
+ # Failure without a corresponding failure message
+ return 'unknown_failure %s' % str(failure.value)
class DirectorException(Exception):
pass
More information about the tor-commits
mailing list