]> git.phdru.name Git - bookmarks_db.git/blobdiff - subproc.py
Cleanup code: use 4 spaces
[bookmarks_db.git] / subproc.py
index c7fd11629c52a526d2cef7b1e1eb63ede7565fac..0280aad6c9fcc10fa0d87c562f44fb6b08eacf3a 100644 (file)
@@ -16,7 +16,7 @@ Subprocess class features:
 
 __version__ = "Revision: 1.15 "
 
-# Id: subproc.py,v 1.15 1998/12/14 20:53:16 klm Exp 
+# Id: subproc.py,v 1.15 1998/12/14 20:53:16 klm Exp
 # Originally by ken manheimer, ken.manheimer@nist.gov, jan 1995.
 
 # Prior art: Initially based python code examples demonstrating usage of pipes
@@ -206,7 +206,7 @@ class Subprocess:
             got0 = self.readPendingChars(n)
             got = got + got0
             n = n - len(got0)
-        return got      
+        return got
     def readPendingChars(self, max=None):
         """Read all currently pending subprocess output as a single string."""
         return self.readbuf.readPendingChars(max)
@@ -401,15 +401,15 @@ class ReadBuf:
 
         got = ""
         if self.buf:
-             if (max > 0) and (len(self.buf) > max):
-                 got = self.buf[0:max]
-                 self.buf = self.buf[max:]
-             else:
-                 got, self.buf = self.buf, ''
-             return got                                         
+            if (max > 0) and (len(self.buf) > max):
+                got = self.buf[0:max]
+                self.buf = self.buf[max:]
+            else:
+                got, self.buf = self.buf, ''
+            return got
 
         if self.eof:
-             return ''
+            return ''
 
         sel = select.select([self.fd], [], [self.fd], 0)
         if sel[2]:
@@ -590,7 +590,7 @@ class Ph:
                 line = string.splitfields(line, ':')
                 it[string.strip(line[0])] = (
                     string.strip(string.join(line[1:])))
-        
+
     def getreply(self):
         """Consume next response from ph, returning list of lines or string
         err."""