Dolda2000 GitWeb
/
pdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cfc372b
)
Close perfproxies on __del__.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 17 Dec 2011 05:58:36 +0000
(06:58 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 17 Dec 2011 05:58:36 +0000
(06:58 +0100)
pdm/cli.py
patch
|
blob
|
blame
|
history
diff --git
a/pdm/cli.py
b/pdm/cli.py
index
d88ebbd
..
4e158d8
100644
(file)
--- a/
pdm/cli.py
+++ b/
pdm/cli.py
@@
-150,8
+150,13
@@
class perfproxy(object):
except: pass
def close(self):
except: pass
def close(self):
- self.cl.run("unbind", self.id)
- del self.cl.proxies[self.id]
+ if self.id is not None:
+ self.cl.run("unbind", self.id)
+ del self.cl.proxies[self.id]
+ self.id = None
+
+ def __del__(self):
+ self.close()
def __enter__(self):
return self
def __enter__(self):
return self