Commit cbeb460e authored by Samuel GAIST's avatar Samuel GAIST

[plotterparameter] Don't use f string yet

The processing nodes are not on Python 3.6 yet
therefore these can not be used.

The other uses are only related to tests and
tasks not done on the processing nodes.
parent 2c3bc396
Pipeline #37996 passed with stage
in 16 minutes and 38 seconds
......@@ -67,7 +67,9 @@ class Storage(utils.Storage):
def __init__(self, prefix, name):
if name.count("/") != 2:
raise RuntimeError(f"invalid plotterparameter name: {name}")
raise RuntimeError(
"invalid plotterparameter name: {name}".format(name=name)
)
self.username, self.name, self.version = name.split("/")
self.fullname = name
......@@ -170,7 +172,9 @@ class Plotterparameter(object):
self.storage = Storage(self.prefix, self._name)
if not self.storage.json.exists():
self.errors.append(
f"Plotterparameter declaration file not found: {data}"
"Plotterparameter declaration file not found: {data}".format(
data=data
)
)
return
data = self.storage.json.path # loads data from JSON declaration
......@@ -219,12 +223,16 @@ class Plotterparameter(object):
self.plotter.clean_parameter(key, val)
except KeyError:
self.errors.append(
f"'{key}' isn't a parameter for plotter {self.plotter.name}"
"'{key}' isn't a parameter for plotter {name}".format(
key=key, name=self.plotter.name
)
)
return
except ValueError:
self.errors.append(
f"'{val}' is invalid for parameter {key} of plotter {self.plotter.name}"
"'{val}' is invalid for parameter {key} of plotter {name}".format(
val=val, key=key, name=self.plotter.name
)
)
return
......
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