##// END OF EJS Templates
cmdserver: drop useless in_ attribute from channeledoutput...
Yuya Nishihara -
r22563:8cc5e673 default
parent child Browse files
Show More
@@ -28,8 +28,7 b' class channeledoutput(object):'
28 data length (unsigned int),
28 data length (unsigned int),
29 data
29 data
30 """
30 """
31 def __init__(self, in_, out, channel):
31 def __init__(self, out, channel):
32 self.in_ = in_
33 self.out = out
32 self.out = out
34 self.channel = channel
33 self.channel = channel
35
34
@@ -43,7 +42,7 b' class channeledoutput(object):'
43 def __getattr__(self, attr):
42 def __getattr__(self, attr):
44 if attr in ('isatty', 'fileno'):
43 if attr in ('isatty', 'fileno'):
45 raise AttributeError(attr)
44 raise AttributeError(attr)
46 return getattr(self.in_, attr)
45 return getattr(self.out, attr)
47
46
48 class channeledinput(object):
47 class channeledinput(object):
49 """
48 """
@@ -138,7 +137,7 b' class server(object):'
138 global logfile
137 global logfile
139 if logpath == '-':
138 if logpath == '-':
140 # write log on a special 'd' (debug) channel
139 # write log on a special 'd' (debug) channel
141 logfile = channeledoutput(sys.stdout, sys.stdout, 'd')
140 logfile = channeledoutput(sys.stdout, 'd')
142 else:
141 else:
143 logfile = open(logpath, 'a')
142 logfile = open(logpath, 'a')
144
143
@@ -153,10 +152,10 b' class server(object):'
153 self.repo = self.repoui = None
152 self.repo = self.repoui = None
154
153
155 if mode == 'pipe':
154 if mode == 'pipe':
156 self.cerr = channeledoutput(sys.stdout, sys.stdout, 'e')
155 self.cerr = channeledoutput(sys.stdout, 'e')
157 self.cout = channeledoutput(sys.stdout, sys.stdout, 'o')
156 self.cout = channeledoutput(sys.stdout, 'o')
158 self.cin = channeledinput(sys.stdin, sys.stdout, 'I')
157 self.cin = channeledinput(sys.stdin, sys.stdout, 'I')
159 self.cresult = channeledoutput(sys.stdout, sys.stdout, 'r')
158 self.cresult = channeledoutput(sys.stdout, 'r')
160
159
161 self.client = sys.stdin
160 self.client = sys.stdin
162 else:
161 else:
General Comments 0
You need to be logged in to leave comments. Login now