From c97cb1d3b902dc68cb0ae0b46bee920a0cab8b73 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 14 Apr 2016 19:14:20 +0800 Subject: [PATCH] master/worker_db: style --- artiq/master/worker_db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/master/worker_db.py b/artiq/master/worker_db.py index 8d3eb891a..5e58ceaf2 100644 --- a/artiq/master/worker_db.py +++ b/artiq/master/worker_db.py @@ -6,7 +6,6 @@ import tempfile import time import re -import numpy as np import h5py from artiq.protocols.sync_struct import Notifier @@ -44,7 +43,8 @@ class RIDCounter: def _update_cache(self, rid): contents = str(rid) + "\n" directory = os.path.abspath(os.path.dirname(self.cache_filename)) - with tempfile.NamedTemporaryFile("w", dir=directory, delete=False) as f: + with tempfile.NamedTemporaryFile("w", dir=directory, delete=False + ) as f: f.write(contents) tmpname = f.name os.replace(tmpname, self.cache_filename) @@ -68,7 +68,7 @@ class RIDCounter: except: continue minute_folders = filter(lambda x: re.fullmatch('\d\d-\d\d', x), - minute_folders) + minute_folders) for mf in minute_folders: minute_path = os.path.join(day_path, mf) try: