[gsoc-admin] EventConfig: Use dict for csvs



commit 7b0ad5836623873e31b67a6fafbdef27bfbc7688
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Wed Aug 12 13:01:50 2015 +0200

    EventConfig: Use dict for csvs

 email/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/email/config.py b/email/config.py
index 6703140..cac4059 100644
--- a/email/config.py
+++ b/email/config.py
@@ -38,7 +38,7 @@ class EventConfig:
         self.ics_sources = []
         self.mail_templates = []
         self.dates = []
-        self.csvs = []
+        self.csvs = {}
 
     def append_from_section(self, section):
         section_type = section['type'].lower()
@@ -68,7 +68,7 @@ class EventConfig:
         csv_data = get_main_data_from_section(section)
         csv_dict = csv.DictReader(csv_data,
                                   delimiter=section.get('delimiter', ','))
-        self.csvs.append(csv_dict)
+        self.csvs[section.name] = csv_dict
 
 
 def parse_event_config(filename):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]