From 6008a4c9dfe40f26a2f413760e0d84921cf7cfdb Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Thu, 4 Aug 2016 14:37:13 +0200 Subject: [PATCH] 'sat jobs' : minor changes --- commands/jobs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/jobs.py b/commands/jobs.py index 7be0fee..2e01564 100644 --- a/commands/jobs.py +++ b/commands/jobs.py @@ -29,6 +29,9 @@ import src STYLESHEET_GLOBAL = "jobs_global_report.xsl" STYLESHEET_BOARD = "jobs_board_report.xsl" +DAYS_SEPARATOR = "," +CSV_DELIMITER = ";" + parser = src.options.Options() parser.add_option('n', 'name', 'string', 'jobs_cfg', @@ -1215,7 +1218,7 @@ class Gui(object): # loop over each csv file and read its content l_read = [] with open(self.file_boards, 'r') as f: - reader = csv.reader(f,delimiter=';') + reader = csv.reader(f,delimiter=CSV_DELIMITER) for row in reader: l_read.append(row) # get the delimiter for the boards (empty line) @@ -1241,7 +1244,7 @@ class Gui(object): for i, square in enumerate(line[1:]): if square=='': continue - days = square.split(',') + days = square.split(DAYS_SEPARATOR) days = [int(day) for day in days] if today in days: if row not in rows: -- 2.39.2