diff --git a/CHANGELOG b/CHANGELOG index d69c3a0..969f883 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.2.7 + * Handle missing files in fs readdir list - 0.2.6 * Ensure atomic state lock in fs - 0.2.5 diff --git a/setup.cfg b/setup.cfg index b5a9e97..7761b63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = shep -version = 0.2.6 +version = 0.2.7 description = Multi-state key stores using bit masks author = Louis Holbrook author_email = dev@holbrook.no diff --git a/shep/store/file.py b/shep/store/file.py index bcd9451..333a212 100644 --- a/shep/store/file.py +++ b/shep/store/file.py @@ -115,7 +115,11 @@ class SimpleFileStore: files = [] for p in os.listdir(self.__path): fp = os.path.join(self.__path, p) - f = open(fp, self.__m[0]) + f = None + try: + f = open(fp, self.__m[0]) + except FileNotFoundError: + continue r = f.read() f.close() if len(r) == 0: