コード例 #1
0
 def handle_no_input(self, con_obj):
     #no_opt action can differ command to command so override this function if required
     obj = None
     try:
         api = lxca_api()
         obj = api.api(self.get_name(), None, con_obj)
     except ConnectionError:
         self.sprint("Connection is not Initialized, Try connect")
     except RuntimeError:
         self.sprint("Session Error to LXCA, Try connect")
     except Exception as err:
         self.sprint("Exception occurred: %s" % (err))
     return obj
コード例 #2
0
ファイル: lxca_icommands.py プロジェクト: Aamit1987/pylxca
 def handle_input(self, dict_handler, con_obj=None):
     obj = None
     api = lxca_api()
     obj = api.api(self.get_name(), dict_handler, con_obj)
     return obj