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