Show More
@@ -167,10 +167,10 b' class appender(object):' | |||||
167 | def _divertopener(opener, target): |
|
167 | def _divertopener(opener, target): | |
168 | """build an opener that writes in 'target.a' instead of 'target'""" |
|
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 | if name != target: |
|
171 | if name != target: | |
172 | return opener(name, mode) |
|
172 | return opener(name, mode, **kwargs) | |
173 | return opener(name + b".a", mode) |
|
173 | return opener(name + b".a", mode, **kwargs) | |
174 |
|
174 | |||
175 | return _divert |
|
175 | return _divert | |
176 |
|
176 | |||
@@ -178,9 +178,10 b' def _divertopener(opener, target):' | |||||
178 | def _delayopener(opener, target, buf): |
|
178 | def _delayopener(opener, target, buf): | |
179 | """build an opener that stores chunks in 'buf' instead of 'target'""" |
|
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 | if name != target: |
|
182 | if name != target: | |
183 | return opener(name, mode) |
|
183 | return opener(name, mode, **kwargs) | |
|
184 | assert not kwargs | |||
184 | return appender(opener, name, mode, buf) |
|
185 | return appender(opener, name, mode, buf) | |
185 |
|
186 | |||
186 | return _delay |
|
187 | return _delay |
General Comments 0
You need to be logged in to leave comments.
Login now