parent was wrongly used in _create_from_name

This commit is contained in:
Dave Halter
2014-01-11 16:04:05 +01:00
parent bfe0c62e7f
commit c6a14a348e
+2 -2
View File
@@ -235,13 +235,13 @@ magic_function_class = PyObject(type(load_module), parent=builtin)
def _create_from_name(module, parent, name): def _create_from_name(module, parent, name):
faked = fake.get_faked(module.obj, parent, name) faked = fake.get_faked(module.obj, parent.obj, name)
if faked is not None: if faked is not None:
faked.parent = parent faked.parent = parent
return faked return faked
try: try:
obj = getattr(parent, name) obj = getattr(parent.obj, name)
except AttributeError: except AttributeError:
# happens e.g. in properties of # happens e.g. in properties of
# PyQt4.QtGui.QStyleOptionComboBox.currentText # PyQt4.QtGui.QStyleOptionComboBox.currentText