diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-07-08 08:13:00 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-07-08 08:13:00 -0400 |
| commit | e2b170a80462255dcc2003380db3547f55d8f14d (patch) | |
| tree | 0757775d3b06c5a1587a12e72b893dd9447e5261 /smmap/mman.py | |
| parent | d13e3aeb168645965720ddec1f469e05771563ef (diff) | |
| download | smmap-e2b170a80462255dcc2003380db3547f55d8f14d.tar.gz | |
Workaround for #1
Diffstat (limited to 'smmap/mman.py')
| -rw-r--r-- | smmap/mman.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/smmap/mman.py b/smmap/mman.py index ef9d43d..f5b7efb 100644 --- a/smmap/mman.py +++ b/smmap/mman.py @@ -52,11 +52,14 @@ class WindowCursor(object): 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): |
