diff --git a/resources/lib/pydrive/apiattr.py b/resources/lib/pydrive/apiattr.py index a97f214..fe99700 100644 --- a/resources/lib/pydrive/apiattr.py +++ b/resources/lib/pydrive/apiattr.py @@ -21,9 +21,10 @@ class ApiAttribute(object): def __del__(self, obj=None): """Delete value of this attribute.""" - del obj.attr[self.name] - if obj.dirty.get(self.name) is not None: - del obj.dirty[self.name] + if(obj != None): + del obj.attr[self.name] + if obj.dirty.get(self.name) is not None: + del obj.dirty[self.name] class ApiAttributeMixin(object):