Kaynağa Gözat

Remove useless log statements in wrapper

Yentl Van Tendeloo 7 yıl önce
ebeveyn
işleme
5895ee2ed9
1 değiştirilmiş dosya ile 0 ekleme ve 14 silme
  1. 0 14
      wrappers/modelverse.py

+ 0 - 14
wrappers/modelverse.py

@@ -164,18 +164,13 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
     controller.username = username
     controller.password = password
     t = OUTPUT()
-    print("Got t: " + str(t))
 
     if t == "OP":
         model = OUTPUT()
-        print("Model: " + str(model))
         if callback is not None:
-            print("INVOKE")
             __invoke(callback, model)
-            print("DONE")
         controller.addInput(Event("data_input", "action_in", [None]))
         time.sleep(2)
-        print("FINISH")
     elif t == "SC":
         while 1:
             empty = True
@@ -183,16 +178,13 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
             # Fetch output from the MV
             response = responses.fetch(0)
             if response is not None:
-                print("Got response: " + str(response))
                 if response.name == "data_output":
                     # Got output of MV, so forward to SCCD
                     if pipe is not None:
                         pipe.send(("input", response.parameters))
                 elif response.name == "result":
-                    print("Got result: " + str(response))
                     # Finished execution, so continue and return result
                     if pipe is not None:
-                        print("SEND TERMINATE")
                         pipe.send(("terminate", []))
                         pipe.close()
                     return
@@ -203,10 +195,8 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
             # Fetch output from the SC
             if pipe is not None and pipe.poll():
                 response = pipe.recv()
-                print("Got data: " + str(response))
 
                 if response.name == "output":
-                    print("ADDED")
                     controller.addInput(Event("data_input", "action_in", [response.parameters]))
                 else:
                     raise Exception("Unknown data from SC to MV: " + str(response))
@@ -240,7 +230,6 @@ def _process_SC(statechart, port_sc, taskname):
 
         response = port_sc.fetch(0)
         if response is not None:
-            print("Got response in process: " + str(response))
             p2c_pipe.send(response)
             empty = False
 
@@ -264,7 +253,6 @@ def OUTPUT():
         if response.name == "result":
             return response.parameters[1]
         elif response.name == "exception":
-            print("Got exception event: " + str(response))
             try:
                 raise eval(response.parameters[1])(*response.parameters[2:])
             except NameError:
@@ -397,13 +385,11 @@ def transformation_add_MANUAL(source_metamodels, target_metamodels, operation_na
 def __transformation_execute(operation_name, input_models_dict, output_models_dict, statechart, tracability_model, fetch_output):
     if statechart is not None:
         port_sc = statechart[0].addOutputListener(statechart[2])
-        print("Added output listener to port " + str(statechart[2]))
 
     INPUT("transformation_execute", [operation_name, input_models_dict, output_models_dict, tracability_model, fetch_output])
     taskname = OUTPUT()
     if statechart is not None:
         threading.Thread(target=_process_SC, args=[statechart, port_sc, taskname]).start()
-    print("Waiting for output...")
     return OUTPUT()
 
 def transformation_execute_MT(operation_name, input_models_dict, output_models_dict, statechart=None, tracability_model="", fetch_output=True):