def validateMasterOption(master):
 try:
  (hostname, port) = master.split(':')
  port = int(port)
 except (TypeError, ValueError):
  raise usage.UsageError("master must have the form 'hostname:port'")

def validateMasterOption ( master ) : try : ( hostname , port ) = master . split ( ':' ) port = int ( port ) except ( TypeError , ValueError ) : raise usage . UsageError ( "master must have the form 'hostname:port'" )
validate master command line option .