def pre_check(self): return_code = super().pre_check() # validate that all locations are remote for location in self.values.locations: (file_host, file_path, err) = SetConnections.parse_location(location) if err: log.Log(err, log.ERROR) return_code |= Globals.RET_CODE_ERR elif not file_host: log.Log( "Only remote locations can be tested but location " "'{lo}' isn't remote".format(lo=location), log.ERROR) return_code |= Globals.RET_CODE_ERR return return_code
def pre_check(self): return_code = super().pre_check() # validate that all locations are remote for location in self.values.locations: (file_host, file_path, err) = SetConnections.parse_location(location) if err: self.log(err, self.log.ERROR) return_code |= 1 # binary 'or' to always get 1 elif not file_host: self.log( "Only remote locations can be tested but '{loc}' " "isn't remote.".format(loc=location), self.log.ERROR) return_code |= 1 # binary 'or' to always get 1 return return_code