Преглед на файлове

RedisStorage.get_node_data: return empty result as None

Helge Jung преди 9 години
родител
ревизия
db0f7aa619
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      ffstatus/redisstorage.py

+ 1 - 1
ffstatus/redisstorage.py

@@ -64,7 +64,7 @@ class RedisStorage(BaseStorage):
     def get_node_data(self, key):
         node = {}
         thedata = self.db.hgetall('node_' + key)
-        if thedata is None:
+        if thedata is None or len(thedata) == 0:
             return None
 
         for item in thedata: