From b3797c95eab79d4c94e0a21cdc938d138d1034c9 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Thu, 30 Jun 2016 11:54:24 +0200 Subject: [PATCH] Handle missing files correctly when checking for altered sources This may happen when checking out older versions or parallel branches --- scripts/boxesserver | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/boxesserver b/scripts/boxesserver index 9c728d3..83b88e3 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -54,7 +54,10 @@ class FileChecker(threading.Thread): if self.checkmodules: self._addModules() for path, timestamp in self.timestamps.items(): - if os.stat(path).st_mtime != timestamp: + try: + if os.stat(path).st_mtime != timestamp: + return False + except FileNotFoundError: return False return True