summaryrefslogtreecommitdiff
path: root/apt/progress/base.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-06-13 09:29:08 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-06-13 09:29:08 +0200
commit122953263c96cd43b0d8a15fa714cd4d80be5ec9 (patch)
tree5c224d903cdaa3cf36ed95db1822f8eb1c3a2c4a /apt/progress/base.py
parentbcef41df6bdefdd95e0b7cab0428b4655accf9fa (diff)
parent5cdd74bc9e017f8802f96d915131c8cf525d4146 (diff)
downloadpython-apt-122953263c96cd43b0d8a15fa714cd4d80be5ec9.tar.gz
merged lp:~ev/python-apt/drop-leaked-fds-fix
Diffstat (limited to 'apt/progress/base.py')
-rw-r--r--apt/progress/base.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/apt/progress/base.py b/apt/progress/base.py
index 88b1ad21..ab57dd82 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -142,14 +142,11 @@ class InstallProgress(object):
def __init__(self):
(self.statusfd, self.writefd) = os.pipe()
+ # These will leak fds, but fixing this safely requires API changes.
self.write_stream = os.fdopen(self.writefd, "w")
self.status_stream = os.fdopen(self.statusfd, "r")
fcntl.fcntl(self.statusfd, fcntl.F_SETFL, os.O_NONBLOCK)
- def __del__(self):
- self.write_stream.close()
- self.status_stream.close()
-
def start_update(self):
"""(Abstract) Start update."""