Example #1
0
 def _readflow(self, paths):
     """
     Utitility function that reads a list of flows
     or raises a DumpError if that fails.
     """
     try:
         return flow.read_flows_from_paths(paths)
     except exceptions.FlowReadException as e:
         raise DumpError(str(e))
Example #2
0
 def _readflow(self, paths):
     """
     Utitility function that reads a list of flows
     or raises a DumpError if that fails.
     """
     try:
         return flow.read_flows_from_paths(paths)
     except exceptions.FlowReadException as e:
         raise DumpError(str(e))
Example #3
0
 def configure(self, options, updated):
     self.options = options
     if options.server_replay and "server_replay" in updated:
         try:
             flows = flow.read_flows_from_paths(options.server_replay)
         except exceptions.FlowReadException as e:
             raise exceptions.OptionsError(str(e))
         self.clear()
         self.load(flows)
 def configure(self, options, updated):
     self.options = options
     if "server_replay" in updated:
         self.clear()
         if options.server_replay:
             try:
                 flows = flow.read_flows_from_paths(options.server_replay)
             except exceptions.FlowReadException as e:
                 raise exceptions.OptionsError(str(e))
             self.load(flows)
 def configure(self, options, updated):
     if "client_replay" in updated:
         if options.client_replay:
             try:
                 flows = flow.read_flows_from_paths(options.client_replay)
             except exceptions.FlowReadException as e:
                 raise exceptions.OptionsError(str(e))
             self.load(flows)
         else:
             self.flows = None
     self.keepserving = options.keepserving
Example #6
0
 def _readflows(self, path):
     """
     Utitility function that reads a list of flows
     or prints an error to the UI if that fails.
     Returns
         - None, if there was an error.
         - a list of flows, otherwise.
     """
     try:
         return flow.read_flows_from_paths(path)
     except exceptions.FlowReadException as e:
         signals.status_message.send(message=str(e))
Example #7
0
 def _readflows(self, path):
     """
     Utitility function that reads a list of flows
     or prints an error to the UI if that fails.
     Returns
         - None, if there was an error.
         - a list of flows, otherwise.
     """
     try:
         return flow.read_flows_from_paths(path)
     except exceptions.FlowReadException as e:
         signals.status_message.send(message=str(e))