changeset 951:b8c1bb917748

fixed usage of reserved keyword in new (unused) scriptrequest classes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 17 Jul 2006 12:17:39 +0200
parents 4eb66637ccd0
children f56db9746839 11d094495f53 f472ddeba121
files MoinMoin/script/__init__.py
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/__init__.py	Mon Jul 17 04:27:24 2006 +0200
+++ b/MoinMoin/script/__init__.py	Mon Jul 17 12:17:39 2006 +0200
@@ -31,23 +31,23 @@
        xmlrpc "channel", but scriptrequest.write needs to write to some buffer we
        transmit later as an xmlrpc function return value.
     """
-    def __init__(self, in, out, err):
-        self.in = in
-        self.out = out
-        self.err = err
+    def __init__(self, instream, outstream, errstream):
+        self.instream = instream
+        self.outstream = outstrem
+        self.errstream = errstream
 
     def read(self, n=None):
         if n is None:
-            data = self.in.read()
+            data = self.instream.read()
         else:
-            data = self.in.read(n)
+            data = self.instream.read(n)
         return data
 
     def write(self, data):
-        self.out.write(data)
+        self.outstream.write(data)
 
     def write_err(self, data):
-        self.err.write(data)
+        self.errstream.write(data)
 
 
 class ScriptRequestCLI(ScriptRequest):
@@ -71,15 +71,15 @@
         string and we also need to catch the output / error output as strings.
     """
     def __init__(self, instr):
-        self.in = StringIO(instr)
-        self.out = StringIO()
-        self.err = StringIO()
+        self.instream = StringIO(instr)
+        self.outstream = StringIO()
+        self.errstream = StringIO()
 
     def fetch_output(self):
-        outstr = self.out.get_value()
-        errstr = self.err.get_value()
-        self.out.close()
-        self.err.close()
+        outstr = self.outstream.get_value()
+        errstr = self.errstream.get_value()
+        self.outstream.close()
+        self.errstream.close()
         return outstr, errstr