[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Dropping redundant --interface validity check
commit dfb6720c3ffef920d91e61065fc9994eb926c026
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Sep 8 16:27:22 2013 -0700
Dropping redundant --interface validity check
Now that we're checking the validity of the --interface arguments while
parsing, we don't need another check later.
---
arm/starter.py | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/arm/starter.py b/arm/starter.py
index a3ac5e3..53b28ff 100644
--- a/arm/starter.py
+++ b/arm/starter.py
@@ -360,17 +360,6 @@ def main():
# no armrc found, falling back to the defaults in the source
stem.util.log.notice(STANDARD_CFG_NOT_FOUND_MSG % args.config)
- # validates that input has a valid ip address and port
- controlAddr = args.control_address
- controlPort = args.control_port
-
- if not arm.util.connections.isValidIpAddress(controlAddr):
- print "'%s' isn't a valid IP address" % controlAddr
- sys.exit()
- elif controlPort < 0 or controlPort > 65535:
- print "'%s' isn't a valid port number (ports range 0-65535)" % controlPort
- sys.exit()
-
# validates and expands log event flags
try:
arm.logPanel.expandEvents(args.logged_events)
@@ -404,7 +393,7 @@ def main():
# sending problems to stdout if they arise
authPassword = config.get("startup.controlPassword", CONFIG["startup.controlPassword"])
incorrectPasswordMsg = "Password found in '%s' was incorrect" % args.config
- controller = _getController(controlAddr, controlPort, authPassword, incorrectPasswordMsg)
+ controller = _getController(args.control_address, args.control_port, authPassword, incorrectPasswordMsg)
# removing references to the controller password so the memory can be freed
# (unfortunately python does allow for direct access to the memory so this
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits