fabdeploy / fabdeploy / containers.py

Diff from to


 class BaseConf(MutableMapping):
     _attrs = (
-        '_task',
+        '_tasks',
     def __init__(
-        task=None,
+        tasks=None,
         versions=['active', 'last', 'previous']):
         self._name = name or 'unknown'
-        self._task = task
+        self._tasks = tasks or []
         self._global_conf = global_conf or self
         self._versions = versions
     def set_name(self, name):
         self._name = name
-    def set_task(self, task):
-        self._task = task
+    def add_task(self, task):
+        self._tasks.append(task)
     def set_global_conf(self, conf):
         self._global_conf = conf
         return value
     def _conf_raw_value(self, name):
-        if self._task:
+        for task in self._tasks:
-                return self._task.conf_value(name)
+                return task.conf_value(name)
             except MissingVarException:
-                pass
+                continue
             return super(BaseConf, self).__getattribute__(name)
         except AttributeError:
         builtins = set([k for k in dir(BaseConf)])
         keys = [k for k in dir(self)
                 if not k.startswith('_') and k not in builtins]
-        if self._task:
-            keys.extend(self._task.conf_keys())
+        for task in self._tasks:
+            keys.extend(task.conf_keys())
         return keys
     def setdefault(self, key, default=None):
     def copy(self):
         d = self.__class__(
-            task=self._task,
+            tasks=self._tasks,
         return d
     # directory name that contains manage.py file (django project root)
     django_dir = ''
     home_path = conf(lambda self: home_path(self.user))
+    fabdeploy_path = ['%(home_path)s', '.fabdeploy.d']
+    fabdeploy_bin_path = ['%(home_path)s', '.fabdeploy.d', 'bin']
     version_path = ['%(home_path)s', '%(version)s']
     version_data_file = ['%(version_path)s', '.fabdeploy']
     src_path = ['%(version_path)s', 'src']
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.