Commit 6d29da49 authored by Vincent Pelletier's avatar Vincent Pelletier

Replace neoctl --ip & --port parameters with a single --address.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 92786b97
......@@ -25,20 +25,23 @@ from neo import setupLog
parser = OptionParser()
parser.add_option('-v', '--verbose', action = 'store_true',
help = 'print verbose messages')
parser.add_option('-p', '--port', help = 'specify the port of admin node',
parser.add_option('-i', '--ip', help = 'specify the ip of admin node')
parser.add_option('-a', '--address', help = 'specify the address (ip:port) ' \
'of an admin node')
parser.add_option('--handler', help = 'specify the connection handler')
(options, args) = parser.parse_args()
port = options.port or 5555
ip = options.ip or ''
address = options.address
if ':' in address:
address, port = address.split(':', 1)
port = int(port)
port = 5555
handler = options.handler or "SocketConnector"
setupLog('NEOCTL', options.verbose)
from import Application
app = Application(ip, port, handler)
app = Application(address, port, handler)
print app.execute(args)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment