[smart] Smart issue #193
Gustavo Niemeyer
gustavo at niemeyer.net
Sun Sep 25 21:13:42 PDT 2005
Hello,
Can you please try the attached patch?
It will be integrated in the next version, which will be
released in the near future.
Thanks,
--
Gustavo Niemeyer
http://niemeyer.net
-------------- next part --------------
Index: smart/backends/rpm/pm.py
===================================================================
--- smart/backends/rpm/pm.py (revision 617)
+++ smart/backends/rpm/pm.py (working copy)
@@ -232,8 +232,10 @@
else:
if self.rpmout:
self.rpmoutlock.release()
- self._rpmout()
- self.rpmoutlock.acquire()
+ try:
+ self._rpmout()
+ finally:
+ self.rpmoutlock.acquire()
os.dup2(sys.stdout.fileno(), 1)
os.dup2(sys.stderr.fileno(), 2)
sys.stdout = self.stdout
Index: smart/util/protectedread.py
===================================================================
--- smart/util/protectedread.py (revision 617)
+++ smart/util/protectedread.py (working copy)
@@ -22,6 +22,8 @@
import codecs
def protectedread(self, size=-1, chars=-1):
+ if not hasattr(self, "charbuffer"):
+ self.charbuffer = u""
while True:
if chars < 0:
if self.charbuffer:
More information about the Smart
mailing list