Show More
@@ -154,13 +154,13 b' class flagprocessorsmixin(object):' | |||||
154 | processed text and ``validatehash`` is a bool indicating whether the |
|
154 | processed text and ``validatehash`` is a bool indicating whether the | |
155 | returned text should be checked for hash integrity. |
|
155 | returned text should be checked for hash integrity. | |
156 | """ |
|
156 | """ | |
157 |
return self._processflagsfunc(text, flags, 'r |
|
157 | return self._processflagsfunc(text, flags, 'raw')[1] | |
158 |
|
158 | |||
159 |
def _processflagsfunc(self, text, flags, operation |
|
159 | def _processflagsfunc(self, text, flags, operation): | |
160 | # fast path: no flag processors will run |
|
160 | # fast path: no flag processors will run | |
161 | if flags == 0: |
|
161 | if flags == 0: | |
162 | return text, True |
|
162 | return text, True | |
163 |
if not |
|
163 | if operation not in ('read', 'write', 'raw'): | |
164 | raise error.ProgrammingError(_("invalid '%s' operation") % |
|
164 | raise error.ProgrammingError(_("invalid '%s' operation") % | |
165 | operation) |
|
165 | operation) | |
166 | # Check all flags are known. |
|
166 | # Check all flags are known. | |
@@ -188,7 +188,7 b' class flagprocessorsmixin(object):' | |||||
188 | if processor is not None: |
|
188 | if processor is not None: | |
189 | readtransform, writetransform, rawtransform = processor |
|
189 | readtransform, writetransform, rawtransform = processor | |
190 |
|
190 | |||
191 | if raw: |
|
191 | if operation == 'raw': | |
192 | vhash = rawtransform(self, text) |
|
192 | vhash = rawtransform(self, text) | |
193 | elif operation == 'read': |
|
193 | elif operation == 'read': | |
194 | text, vhash = readtransform(self, text) |
|
194 | text, vhash = readtransform(self, text) |
General Comments 0
You need to be logged in to leave comments.
Login now