Closed nth10sd closed 6 years ago
Do you think this method may be a more elegant way of checking if it is a string/unicode?
isinstance(x, ("".__class__, u"".__class__))
fwiw I fixed a similar bug in funfuzz using the above method in the previous comment successfully.
@jschwartzentruber dug deeper, who found that 025fa958abf97573c242f623d5144aec7ea2684e was likely the cause. There seems to no longer be a use for log_prefix so we should raise if log_prefix is not a string, and always create "-out.txt" and "-err.txt" log files.
When debugging funfuzz PR 168 I realised that this line in
timed_run
was only creating log files whenlogPrefix
is astr
.Which means it fails if
logPrefix
is of thebytes
type.@jschwartzentruber, what do you think is the right way forward? Should it remain as-is, or should it change to a
bool
-like check? Or should thestr
type be enforced in other projects?i.e.
useLogFiles = logPrefix if logPrefix else False