|
@@ -11,7 +11,7 @@ class BatcaveClient(object):
|
|
|
assert url.endswith("/"), "BATCAVE URL must end with slash."
|
|
|
|
|
|
self.base_url = url
|
|
|
- self.logger = logging.getLogger()
|
|
|
+ self.logger = logging.getLogger("BATCAVE")
|
|
|
|
|
|
def __load_response(self, url, error_context):
|
|
|
raw_data = None
|
|
@@ -63,6 +63,9 @@ class BatcaveClient(object):
|
|
|
url = 'find?mac=' + mac
|
|
|
matches = self.__load_response(url, 'find_mac=' + mac)
|
|
|
|
|
|
+ if matches is None:
|
|
|
+ return None
|
|
|
+
|
|
|
if single_match_only:
|
|
|
if len(matches) == 1:
|
|
|
return matches[0]
|