From 1e0544d70dabed4f33e0624cb4a7cde4c8c6b691 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 26 Apr 2016 21:45:45 +0200 Subject: Fix flake8 violations Change-Id: Idd0f4bec503578c2f2031cbcdee97ea27d22ac14 Signed-off-by: jose.lausuch --- storperf/db/configuration_db.py | 12 ++++++------ storperf/db/job_db.py | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'storperf') diff --git a/storperf/db/configuration_db.py b/storperf/db/configuration_db.py index 700588d..b12394e 100644 --- a/storperf/db/configuration_db.py +++ b/storperf/db/configuration_db.py @@ -51,9 +51,9 @@ class ConfigurationDB(object): db = sqlite3.connect(ConfigurationDB.db_name) cursor = db.cursor() - cursor.execute( - "delete from configuration where configuration_name=? and key=?", - (configuration_name, key)) + cursor.execute("delete from configuration where " + "configuration_name=? and key=?", + (configuration_name, key)) self.logger.debug("Deleted " + configuration_name + ":" + key) @@ -105,9 +105,9 @@ class ConfigurationDB(object): db = sqlite3.connect(ConfigurationDB.db_name) cursor = db.cursor() - cursor.execute( - "delete from configuration where configuration_name=? and key=?", - (configuration_name, key)) + cursor.execute("delete from configuration where " + "configuration_name=? and key=?", + (configuration_name, key)) cursor.execute( """insert into configuration(configuration_name, key, value) diff --git a/storperf/db/job_db.py b/storperf/db/job_db.py index 8aa4c11..0e94358 100644 --- a/storperf/db/job_db.py +++ b/storperf/db/job_db.py @@ -110,8 +110,8 @@ class JobDB(object): workload_name, now,)) else: - self.logger.warn("Duplicate start time for workload " - + workload_name) + self.logger.warn("Duplicate start time for workload %s" + % workload_name) cursor.execute( """update jobs set job_id = ?, @@ -146,8 +146,8 @@ class JobDB(object): (self.job_id, workload_name,)) if (row.fetchone() is None): - self.logger.warn("No start time recorded for workload " - + workload_name) + self.logger.warn("No start time recorded for workload %s" + % workload_name) cursor.execute( """insert into jobs (job_id, @@ -207,10 +207,10 @@ class JobDB(object): self.logger.info("workload=" + workload + "start=" + start_time + " end=" + end_time) - request = 'http://127.0.0.1:8000/render/?target=*.' + self.job_id + \ - '.' + workload + '.jobs.1.*.clat.mean&format=json&from=' + \ - start_time + "&until=" + end_time - + request = ("http://127.0.0.1:8000/render/?target=" + "*.%s.%s.jobs.1.*.clat.mean" + "&format=json&from=%s&until=%s" + % (self.job_id, workload, start_time, end_time)) response = requests.get(request) if (response.status_code == 200): -- cgit 1.2.3-korg