From 1fc362c32da4b0a701badc7261d6fd7acfe4c163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20K=C3=A1cha?= <ph@cesnet.cz> Date: Wed, 25 Feb 2015 16:34:07 +0100 Subject: [PATCH] Changed opening last id file - it's now automatically created even when only reading --- warden3/warden_client/warden_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warden3/warden_client/warden_client.py b/warden3/warden_client/warden_client.py index c177682..7b1fb43 100644 --- a/warden3/warden_client/warden_client.py +++ b/warden3/warden_client/warden_client.py @@ -448,7 +448,7 @@ class Client(object): if not idf: return None try: - with open(idf, "r") as f: + with open(idf, "w+") as f: id = int(f.read()) except (ValueError, IOError) as e: Error(message="Reading id file \"%s\" failed, relying on server" % idf, -- GitLab