Skip to content

NameError when set_outlet_name used with hyphen #43

@DavidAntliff

Description

@DavidAntliff

I expect dlipower set_outlet_name 1 foo-bar to set the outlet name to "foo-bar", but instead it throws this NameError exception:

$ dlipower set_outlet_name 1 "foo-bar"
Traceback (most recent call last):
  File "/home/.../dlipower", line 117, in <module>
    outlet_range = _block_to_list(','.join(args[1:]))
  File "/home/.../dlipower", line 49, in _block_to_list
    for value in outlet_range(int(val1), int(val2) + 1):
NameError: name 'outlet_range' is not defined

Setting to "foobar" works. I suspect the name is being interpreted as some kind of range but it's not clear how to escape the - character to avoid this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions