Closed delirious-lettuce closed 6 years ago
Hey, Well, that's a bug. I think you're right on the solution. Want to open a one liner PR? 🥇
Also, what did you change in the configuration to run into this bug?
Will be solved in a bugfix soon :)
fixed in #111
Expected Behavior
Not raise a TypeError
Actual Behavior
Raises a TypeError
Steps to Reproduce the Problem
_cast_by_example
with avalue
which isn'tNone
andexample
as a tuple with a minimum length of1
.The problem is in this line:
https://github.com/guardicore/monkey/blob/8f0251e822f937d9ee38bccc982fb50e8a9fcdb2/infection_monkey/config.py#L28
The issue is calling
tuple(None)
:Potential Fix
The problem line is almost exactly the same as this line (four lines below the problem line):
https://github.com/guardicore/monkey/blob/8f0251e822f937d9ee38bccc982fb50e8a9fcdb2/infection_monkey/config.py#L32
After looking at that, it seems like a potential fix would be either:
Both of these produce a tuple with one element which is
None
.I didn't send a PR since I wasn't exactly sure if this would be correct and if so, which one of these would be preferred.