More fixes, because of CompiledObject modifications

This commit is contained in:
Dave Halter committed 2018-09-17 02:40:34 +02:00
1 parent eb9a852443
commit cc3b08fd1b
2 files changed
+10 -5

No files matched your search

+3 -2
View File
@@ -20,7 +20,8 @@ class CompiledValue(ContextWrapper):
self._compiled_obj = compiled_obj
def __getattribute__(self, name):
if name in ('get_safe_value', 'execute_operation', 'access_handle'):
if name in ('get_safe_value', 'execute_operation', 'access_handle',
'negate'):
return getattr(self._compiled_obj, name)
return super(CompiledValue, self).__getattribute__(name)
@@ -33,7 +34,7 @@ def create_simple_object(evaluator, obj):
Only allows creations of objects that are easily picklable across Python
versions.
"""
assert type(obj) in (int, float, str, bytes, unicode, slice, complex)
assert type(obj) in (int, float, str, bytes, unicode, slice, complex, bool), obj
compiled_obj = create_from_access_path(
evaluator,
evaluator.compiled_subprocess.create_simple_object(obj)