Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix python2 str(circuits.core.values.Value())
I am not sure why Value has a __str__ method at all. But it's broken on python2. It assumes value is always a unicode-string, while coroutines can return anything, even lists. This causes various crashes. >>> str(circuits.core.values.Value()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/fbest/git/circuits/circuits/six.py", line 854, in <lambda> klass.__str__ = lambda self: self.__unicode__().encode('utf-8') File "/home/fbest/git/circuits/circuits/core/values.py", line 78, in __str__ return self.value.encode('utf-8') AttributeError: 'NoneType' object has no attribute 'encode'
- Loading branch information