Skip to content

Commit

Permalink
Accept integers in fault configuration directly without list
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasauer committed Aug 11, 2022
1 parent 14cd660 commit f97ee2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def build_ranges(fault_range):
"""
if isinstance(fault_range, dict):
return build_ranges_dict(fault_range)
if type(fault_range) == int:
return range(fault_range, fault_range + 1, 1)
if len(fault_range) == 3:
return range(fault_range[0], fault_range[1], fault_range[2])
elif len(fault_range) == 1:
Expand Down

0 comments on commit f97ee2e

Please sign in to comment.