Since the while loop adds one before the function generates a new name, if the loop is entered, it will never give a string with the value #1 at the end.
Fixed either by changing the initialisation on L718 to i = 0, or by swapping the order of lines 720 and 721; in this case, i will be raised after every test, but only compiled into the string with a new value if the first fails.
A small thing, but I was finding it really annoying when trying to write a definition.
https://github.com/Ultimaker/Uranium/blob/925e1f045cc517ba22f8597495d4d4c8b084d5da/UM/Settings/ContainerRegistry.py#L717-L722
Since the while loop adds one before the function generates a new name, if the loop is entered, it will never give a string with the value
#1
at the end.Fixed either by changing the initialisation on L718 to
i = 0
, or by swapping the order of lines 720 and 721; in this case,i
will be raised after every test, but only compiled into the string with a new value if the first fails.