Commits

Jan Borsodi  committed 10d7d0f

Use the dir of the config file if one is specified.

  • Participants
  • Parent commits b4abb79

Comments (0)

Files changed (2)

File hob/proto.py

         if ("target." + self.name, servicename) not in self.config:
             raise ConfigError("Could not find service '%s' in target configuration '%s'" % (servicename, self.name))
         filepath = self.config[("target." + self.name, servicename)]
-        return os.path.normpath(os.path.join(self.config[("services", "path")], filepath))
+        path = self.config[("services", "path")]
+        if not os.path.isabs(path) and self.config.base:
+            path = os.path.join(self.config.base, path)
+        return os.path.normpath(os.path.join(path, filepath))
 
     def findService(self, name):
         path = self.name
     False
     """
     parser = None
+    base   = None
 
     def __init__(self):
         self.parser = ConfigParser.SafeConfigParser()

File hob/script.py

     if config_file:
         ui.config.reset()
         ui.config.read([config_file])
+        ui.config.base = os.path.abspath(os.path.dirname(config_file))
 
     PackageManager.validator_type = OperaValidator