[smart] smart 0.39 error on FC3

Gustavo Niemeyer gustavo at niemeyer.net
Tue Oct 18 05:06:01 PDT 2005


Hello Jeffrey,

I've just found an unread message from you in an old thread.

Apologies for not giving the deserved attention before.

[...]
> AttributeError: 'file' object has no attribute 'bytebuffer'
> 
> Any possibility of a patch for this problem? :D

If it's not too late, can you please try that one:

--- smart/util/protectedread.py (revision 630)
+++ smart/util/protectedread.py (working copy)
@@ -22,8 +22,15 @@
 import codecs

 def protectedread(self, size=-1, chars=-1):
+
     if not hasattr(self, "charbuffer"):
         self.charbuffer = u""
+        self.bytebuffer = u""
+        self.linebuffer = None
+    elif self.linebuffer:
+        self.charbuffer = "".join(self.linebuffer)
+        self.linebuffer = None
+
     while True:
         if chars < 0:
             if self.charbuffer:


-- 
Gustavo Niemeyer
http://niemeyer.net



More information about the Smart mailing list