You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the following exception:
labgrid-client: error: Value '15' in filter 'my_tag=15' is invalid
I think in order to fix it we just need to replace TAG_KEY.match(v) with TAG_VAL.match(v) in the create_reservation function:
/labgrid/remote/client.py
async def create_reservation(self):
prio = self.args.prio
fltr = {}
for pair in self.args.filters:
try:
k, v = pair.split("=")
except ValueError:
raise UserError(f"'{pair}' is not a valid filter (must contain a '=')")
if not TAG_KEY.match(k):
raise UserError(f"Key '{k}' in filter '{pair}' is invalid")
if not TAG_KEY.match(v):
raise UserError(f"Value '{v}' in filter '{pair}' is invalid")
fltr[k] = v
`
The text was updated successfully, but these errors were encountered:
When I tried to create a reservation:
labgrid-client -p idan create
labgrid-client -p idan set-tags my_tag=15
labgrid-client reserve my_tag=15
I got the following exception:
labgrid-client: error: Value '15' in filter 'my_tag=15' is invalid
I think in order to fix it we just need to replace TAG_KEY.match(v) with TAG_VAL.match(v) in the create_reservation function:
/labgrid/remote/client.py
`
TAG_KEY = re.compile(r"[a-z][a-z0-9_]+")
TAG_VAL = re.compile(r"[a-z0-9_]?")
....
....
`
The text was updated successfully, but these errors were encountered: