@@ -201,7 +201,8 @@ def VerifyResult(self, response, fields):
201201
202202 if self .MAX_LENGTH and len (url_field ) > self .MAX_LENGTH :
203203 self .AddAdvisory (
204- '%s field in %s was %d, will ACK Overflow after %d, could you make a shorter URL?' %
204+ '%s field in %s was %d, will ACK Overflow after %d, could you make '
205+ 'a shorter URL?' %
205206 (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name ,
206207 len (url_field ), self .MAX_LENGTH ))
207208
@@ -214,7 +215,8 @@ def VerifyResult(self, response, fields):
214215 (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name , url_field ))
215216 else :
216217 # Advisory if not HTTP(S) and maybe FTP for firmware...
217- if self .ALLOWED_SCHEMAS and url_result .scheme not in self .ALLOWED_SCHEMAS :
218+ if (self .ALLOWED_SCHEMAS and
219+ (url_result .scheme not in self .ALLOWED_SCHEMAS )):
218220 self .AddAdvisory (
219221 '%s field in %s had schema %s, expected one of %s' %
220222 (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name ,
@@ -227,13 +229,16 @@ def VerifyResult(self, response, fields):
227229 (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name ))
228230 # else:
229231 # TODO(Peter): Check for a dot in the netloc
230- # TODO(Peter): Check the netloc domain isn't a prohibited internal only one
232+ # TODO(Peter): Check the netloc domain isn't a prohibited internal
233+ # only one
231234
232- # TODO(Peter): Optionally expect at least one other section (product/firmware)
235+ # TODO(Peter): Optionally expect at least one other section
236+ # (product/firmware)
233237 except ValueError as err :
234238 self .SetFailed (
235239 '%s field in %s didn\' t parse as a URL due to %s, was %s' %
236- (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name , str (err ), url_field ))
240+ (self .EXPECTED_FIELDS [0 ].capitalize (), self .pid .name , str (err ),
241+ url_field ))
237242
238243
239244class GetRequiredMixin (ResponderTestFixture ):
0 commit comments