Commit f44ec28a authored by Martin Reinecke's avatar Martin Reinecke
Browse files

support empty 'spaces' arguments

parent ed3a2d8c
Pipeline #26352 passed with stages
in 5 minutes and 39 seconds
......@@ -84,6 +84,8 @@ def parse_spaces(spaces, nspc):
spaces = (safe_cast(int, spaces),)
spaces = tuple(safe_cast(int, item) for item in spaces)
if len(spaces) == 0:
return spaces
tmp = tuple(set(spaces))
if tmp[0] < 0 or tmp[-1] >= nspc:
raise ValueError("space index out of range")
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