[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Catch ValueErrors while coercing PluggableTransport port numbers.



commit 83378640b09dc8a6c6d5a58389fd36c25dab37b1
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sat Dec 6 00:17:24 2014 +0000

    Catch ValueErrors while coercing PluggableTransport port numbers.
---
 lib/bridgedb/bridges.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bridgedb/bridges.py b/lib/bridgedb/bridges.py
index 21d9257..ecbf863 100644
--- a/lib/bridgedb/bridges.py
+++ b/lib/bridgedb/bridges.py
@@ -240,7 +240,7 @@ class PluggableTransport(object):
         try:
             # Coerce the port to be an integer:
             self.port = int(self.port)
-        except TypeError:
+        except (TypeError, ValueError):
             raise MalformedPluggableTransport(
                 ("Cannot create PluggableTransport with port type: %s.")
                 % type(self.port))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits