PSKManagement.py
changeset 2429 15f18dc8b56a
parent 2428 e0f16317668e
child 2460 89abeece2c71
--- a/PSKManagement.py	Thu Nov 22 23:39:54 2018 +0100
+++ b/PSKManagement.py	Fri Nov 23 00:33:04 2018 +0100
@@ -52,8 +52,10 @@
 
 def GetData(project_path):
     loaded_data = _LoadData(project_path)
-    psk_files = os.listdir(_pskpath(project_path))
-    return _filterData(psk_files, loaded_data)
+    if loaded_data:
+        psk_files = os.listdir(_pskpath(project_path))
+        return _filterData(psk_files, loaded_data)
+    return []
 
 def DeleteID(project_path, ID):
     secret_path = os.path.join(_pskpath(project_path), ID+'.secret')