Changeset 209 for etherws


Ignore:
Timestamp:
08/04/12 02:58:04 (12 years ago)
Author:
atzm
Message:
  • fixed behavior when "addport client" password was empty
File:
1 edited

Legend:

Unmodified
Added
Removed
  • etherws/trunk/etherws.py

    r208 r209  
    783783        if args.ctluser: 
    784784            if not args.ctlpasswd: 
    785                 args.ctlpasswd = getpass.getpass() 
     785                args.ctlpasswd = getpass.getpass('Control Password: ') 
    786786            token = base64.b64encode('%s:%s' % (args.ctluser, args.ctlpasswd)) 
    787787            req.add_header('Authorization', 'Basic %s' % token) 
     
    823823               not args.target.startswith('wss://'): 
    824824                raise ValueError('Invalid target URL scheme: %s' % args.target) 
    825         if opts['user'] and not opts['passwd']: 
    826             raise ValueError('Authentication required but password empty') 
    827825        if not opts['user'] and opts['passwd']: 
    828826            raise ValueError('Authentication required but username empty') 
     827        if opts['user'] and not opts['passwd']: 
     828            opts['passwd'] = getpass.getpass('Client Password: ') 
    829829        result = request(args, 'addPort', { 
    830830            'type':    args.iftype, 
Note: See TracChangeset for help on using the changeset viewer.