Пример #1
0
    def handle(self, options, global_options, *args):
        if not args:
            print "Error: The message is required."
            return
        else:
            command = args[0]
            data = None
            if len(args) > 1:
                data = args[1]

        client = GenericClient(port=options.port, host=options.host)
        client.send(command, data)
Пример #2
0
 def handle(self, options, global_options, *args):
     if not args:
         print "Error: The message is required."
         return 
     else:
         command = args[0]
         data = None
         if len(args)>1:
             data = args[1]
     
     client = GenericClient(port=options.port, host=options.host)
     client.send(command, data)
Пример #3
0
    def handle(self, options, global_options, *args):

        client = GenericClient(port=options.port, host=options.host)
        client.start()
Пример #4
0
 def handle(self, options, global_options, *args):
     
     client = GenericClient(port=options.port, host=options.host)
     client.start()