{"issue":{"created_at":"2011-07-08T12:15:16Z","state":"closed","updated_at":"2011-12-05T06:31:28Z","comments":14,"user":{"gravatar_id":"2eccc4005572c1e2b12a9c00580bc86f","id":119893,"url":"https://api.github.com/users/kennethreitz","login":"kennethreitz","avatar_url":"https://secure.gravatar.com/avatar/2eccc4005572c1e2b12a9c00580bc86f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"So, apparently sometimes `getrefcount` is None. This was causing the strange hidden exception behavior. \r\n\r\nWhen an exception occurs in `__del__` methods, they get suppressed and printed to the terminal upon process exit.\r\n\r\nThis simple try/except makes my problem go away, but is prob not the best way to fix it. :)","assignee":null,"number":2,"id":1189574,"pull_request":{"patch_url":"https://github.com/Byron/smmap/pull/2.patch","html_url":"https://github.com/Byron/smmap/pull/2","diff_url":"https://github.com/Byron/smmap/pull/2.diff"},"labels":[],"title":"Workaround for #1","closed_at":"2011-11-09T15:15:25Z","html_url":"https://github.com/Byron/smmap/issues/2","url":"https://api.github.com/repos/Byron/smmap/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-12-05T06:31:28Z","updated_at":"2011-12-05T06:31:28Z","user":{"gravatar_id":"f6de55ecee8e1daf9eff73f9e1a8f484","id":71067,"url":"https://api.github.com/users/Autoplectic","login":"Autoplectic","avatar_url":"https://secure.gravatar.com/avatar/f6de55ecee8e1daf9eff73f9e1a8f484?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"so slight update.  even though mmap.py contains:\r\n\r\n    import sys\r\n    from sys import getrefcount\r\n\r\nboth are `None` within the `_destroy` method.  not sure why. so anyway, just to be clear, if you change line 55 to the lines\r\n\r\n    from sys import getrefcount\r\n    num_clients = getrefcount(self._rlist) - 4\r\n\r\nit works without error, and should logically be doing the same as using the call to `client_count()`\r\n\r\nalso, running smmap's nosetests results in no errors, so whatever error this is, it's not covered by the tests.\r\n    ","id":3011742,"url":"https://api.github.com/repos/Byron/smmap/issues/comments/3011742"}}