Commits

Martin Czygan  committed 754fb92

processor doesn't need to know configuration file paths

  • Participants
  • Parent commits ae4a2b0

Comments (0)

Files changed (1)

File mdhub/processor.py

         ``store_configuration`` are pathes to the configuration files,
         not objects.
         """
-        self.import_conf_path = os.path.expanduser(import_conf_path)
         # get a handle on a import configuration
         self.import_conf = importconfig.ImportConfiguration(
-            self.import_conf_path)
+            os.path.expanduser(import_conf_path))
 
         # Just get the store type out of the config
         # and set ``self.store`` accordingly (without import magic)
-        self.store_conf_path = os.path.expanduser(store_conf_path)
-        self.store_type = get_store_type(self.store_conf_path)
-        if self.store_type == 'redis':
-            self.store = store.RedisStore(self.store_conf_path)
-        elif self.store_type == 'rdbms':
+        store_type = get_store_type(os.path.expanduser(store_conf_path))
+        if store_type == 'redis':
+            self.store = store.RedisStore(os.path.expanduser(store_conf_path))
+        elif store_type == 'rdbms':
             raise NotImplementedError
         else:
             raise exc.MetaDataHubException(
                 "No suitable store defined in: {0}".format(
-                    self.store_conf_path))
+                    os.path.expanduser(store_conf_path)))
         # TODO: Add more store types here ...
 
     def process(self):