146 |
146 |
147 @param host host to check for (string) |
147 @param host host to check for (string) |
148 @return flag indicating presence in the whitelist (boolean) |
148 @return flag indicating presence in the whitelist (boolean) |
149 """ |
149 """ |
150 return host in self.__whitelist or \ |
150 return host in self.__whitelist or \ |
151 "www." + host in self.__whitelist or \ |
151 "www." + host in self.__whitelist or \ |
152 host.replace("www.", "") in self.__whitelist |
152 host.replace("www.", "") in self.__whitelist |
153 |
153 |
154 def addToWhitelist(self, host): |
154 def addToWhitelist(self, host): |
155 """ |
155 """ |
156 Public method to add a host to the whitelist. |
156 Public method to add a host to the whitelist. |
157 |
157 |