Explorar el Código

BatcaveClient: get_node() handles retrieval error correctly

Helge Jung hace 9 años
padre
commit
eec6ca773a
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      modules/batcave/client.py

+ 3 - 0
modules/batcave/client.py

@@ -46,6 +46,9 @@ class BatcaveClient(object):
         url = 'find?name=' + name + '&fuzzy=' + ('1' if fuzzymatch else '0')
         matches = self.__load_response(url, 'find_name=' + name)
 
+        if matches is None:
+            return None
+
         if single_match_only:
             if len(matches) == 1:
                 return matches[0]