##// END OF EJS Templates
changelog: fix the diverted opener to accept more kwargs...
marmoute -
r44507:7f67f534 default
parent child Browse files
Show More
@@ -167,10 +167,10 b' class appender(object):'
167 167 def _divertopener(opener, target):
168 168 """build an opener that writes in 'target.a' instead of 'target'"""
169 169
170 def _divert(name, mode=b'r', checkambig=False):
170 def _divert(name, mode=b'r', checkambig=False, **kwargs):
171 171 if name != target:
172 return opener(name, mode)
173 return opener(name + b".a", mode)
172 return opener(name, mode, **kwargs)
173 return opener(name + b".a", mode, **kwargs)
174 174
175 175 return _divert
176 176
@@ -178,9 +178,10 b' def _divertopener(opener, target):'
178 178 def _delayopener(opener, target, buf):
179 179 """build an opener that stores chunks in 'buf' instead of 'target'"""
180 180
181 def _delay(name, mode=b'r', checkambig=False):
181 def _delay(name, mode=b'r', checkambig=False, **kwargs):
182 182 if name != target:
183 return opener(name, mode)
183 return opener(name, mode, **kwargs)
184 assert not kwargs
184 185 return appender(opener, name, mode, buf)
185 186
186 187 return _delay
General Comments 0
You need to be logged in to leave comments. Login now