Fix Handle.from_struct to return just handle

This commit is contained in:
Doug Blank 2013-11-09 23:14:11 -05:00
parent 130e2890c6
commit c24e037a64

View File

@ -44,5 +44,7 @@ class Handle:
def from_struct(cls, struct): def from_struct(cls, struct):
if isinstance(struct, Handle): if isinstance(struct, Handle):
return struct.handle return struct.handle
elif isinstance(struct, dict):
return struct["handle"]
else: else:
return struct return struct