From afdfaeec6887620a620e219074cf81a01d6cb011 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 3 Dec 2018 18:31:12 -0800 Subject: [PATCH] Check if "_lockfile" attribute exists --- platformio/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/app.py b/platformio/app.py index 57c126a9..14c4de22 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -122,7 +122,7 @@ class State(object): raise exception.HomeDirPermissionsError(dirname(self.path)) def _unlock_state_file(self): - if self._lockfile: + if hasattr(self, "_lockfile") and self._lockfile: self._lockfile.release() def __del__(self):