Commit 50ceb798 authored by Cyril Guilloud's avatar Cyril Guilloud

fix yaml warning: specify the loader to avoid arbitrary code execution (security)

more info:
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
parent 8d5cfa43
Pipeline #11596 failed with stages
in 29 minutes and 55 seconds
......@@ -1371,7 +1371,7 @@ class ParametersWardrobe(metaclass=ParametersType):
yml: string containing yml data
instance_name: the name of the instance that you want to import
"""
dict_in = yaml.load(yml)
dict_in = yaml.load(yml, Loader=yaml.FullLoader)
if dict_in.get("WardrobeName") != self._wardr_name:
logger.warning("Wardrobe Names are different")
try:
......
......@@ -49,9 +49,6 @@ class SimulationDiodeSamplingCounter(SamplingCounter):
gevent.sleep(0.01) # simulate hw reading
return random.randint(-100, 100)
def __repr__(self):
return "Simulation diode in SamplingCounter mode."
class CstSimulationDiodeSamplingCounter(SamplingCounter):
def __init__(self, *args, **kwargs):
......@@ -66,9 +63,6 @@ class CstSimulationDiodeSamplingCounter(SamplingCounter):
gevent.sleep(0.01) # simulate hw reading
return self.cst_val
def __repr__(self):
return "Simulation diode in SamplingCounter mode."
class SimulationDiodeIntegratingCounter(IntegratingCounter):
def get_values(self, from_index, sleep=True):
......@@ -76,9 +70,6 @@ class SimulationDiodeIntegratingCounter(IntegratingCounter):
gevent.sleep(0.01)
return 10 * [random.randint(-100, 100)]
def __repr__(self):
return "Simulation diode in IntegratingCounter mode."
DEFAULT_CONTROLLER = simulation_diode_controller()
......
......@@ -833,7 +833,7 @@ class beacon(object):
@_info
def get_instance_name_list(self, server_name):
server_name = server_name + "\*"
server_name = server_name + r"\*"
server_list = self.get_server_list(server_name)
result = []
for server in server_list:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment