- for port in [ '',':80',':443']:
- for path in ['PLCAPI','PLCAPI/']:
- if protocol=='http' and port==':443': continue
- if protocol=='https' and port==':80': continue
- url="%s://%s%s/%s"%(protocol,dest,port,path)
- if not self.try_url_expected (url,expected): overall=False
+ for port in [ '', ':80', ':443']:
+ for path in ['PLCAPI', 'PLCAPI/']:
+ if protocol=='http' and port==':443':
+ continue
+ if protocol=='https' and port==':80':
+ continue
+ required = (protocol=='https') and (path=='PLCAPI/')
+ url="{}://{}{}/{}".format(protocol, dest, port, path)
+ if not self.try_url_required (url,required):
+ overall=False