mirror of https://github.com/celery/kombu.git
Fixes 'function object has no attribute "close"'. Closes #78
This commit is contained in:
parent
d0ca4c263b
commit
321c8baebb
|
@ -706,7 +706,10 @@ class Resource(object):
|
||||||
dres = dirty.pop()
|
dres = dirty.pop()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
break
|
break
|
||||||
|
try:
|
||||||
self.close_resource(dres)
|
self.close_resource(dres)
|
||||||
|
except AttributeError: # Issue #78
|
||||||
|
pass
|
||||||
|
|
||||||
mutex = getattr(resource, "mutex", None)
|
mutex = getattr(resource, "mutex", None)
|
||||||
if mutex:
|
if mutex:
|
||||||
|
@ -717,7 +720,10 @@ class Resource(object):
|
||||||
res = resource.queue.pop()
|
res = resource.queue.pop()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
break
|
break
|
||||||
|
try:
|
||||||
self.close_resource(res)
|
self.close_resource(res)
|
||||||
|
except AttributeError:
|
||||||
|
pass # Issue #78
|
||||||
finally:
|
finally:
|
||||||
if mutex:
|
if mutex:
|
||||||
mutex.release()
|
mutex.release()
|
||||||
|
|
Loading…
Reference in New Issue