Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote branch 'kennethreitz/fix/1' into integrate

  • Loading branch information...
commit 24a35052108e7cd15a040348d151328a2d528921 2 parents bdc1258 + e2b170a
@Byron Byron authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 smmap/mman.py
View
13 smmap/mman.py
@@ -52,11 +52,14 @@ def _destroy(self):
if self._rlist is not None:
# Actual client count, which doesn't include the reference kept by the manager, nor ours
# as we are about to be deleted
- num_clients = self._rlist.client_count() - 2
- if num_clients == 0 and len(self._rlist) == 0:
- # Free all resources associated with the mapped file
- self._manager._fdict.pop(self._rlist.path_or_fd())
- #END remove regions list from manager
+ try:
+ num_clients = self._rlist.client_count() - 2
+ if num_clients == 0 and len(self._rlist) == 0:
+ # Free all resources associated with the mapped file
+ self._manager._fdict.pop(self._rlist.path_or_fd())
+ # END remove regions list from manager
+ except TypeError:
+ pass
#END handle regions
def _copy_from(self, rhs):
Please sign in to comment.
Something went wrong with that request. Please try again.