finish context
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
0397e77a3e
commit
d4f6328eef
1 changed files with 3 additions and 11 deletions
|
@ -31,8 +31,6 @@ import os
|
||||||
#import cdist.core
|
#import cdist.core
|
||||||
#import cdist.exec
|
#import cdist.exec
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class Context:
|
class Context:
|
||||||
"""Hold information about current context"""
|
"""Hold information about current context"""
|
||||||
|
|
||||||
|
@ -47,7 +45,9 @@ class Context:
|
||||||
# Only required for testing
|
# Only required for testing
|
||||||
self.exec_path = exec_path
|
self.exec_path = exec_path
|
||||||
|
|
||||||
log.addFilter(self)
|
# Context logging
|
||||||
|
self.log = logging.getLogger(__name__)
|
||||||
|
self.log.addFilter(self)
|
||||||
|
|
||||||
# Base and Temp Base
|
# Base and Temp Base
|
||||||
self.base_path = (base_path or
|
self.base_path = (base_path or
|
||||||
|
@ -88,14 +88,6 @@ class Context:
|
||||||
self.remote_type_path = os.path.join(self.remote_conf_path, "type")
|
self.remote_type_path = os.path.join(self.remote_conf_path, "type")
|
||||||
self.remote_global_explorer_path = os.path.join(self.remote_conf_path, "explorer")
|
self.remote_global_explorer_path = os.path.join(self.remote_conf_path, "explorer")
|
||||||
|
|
||||||
# Setup env to be used by others
|
|
||||||
self.__init_env()
|
|
||||||
|
|
||||||
# Create directories
|
|
||||||
self.__init_local_paths()
|
|
||||||
self.__init_remote_paths()
|
|
||||||
|
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
# Do not use in __del__:
|
# Do not use in __del__:
|
||||||
# http://docs.python.org/reference/datamodel.html#customization
|
# http://docs.python.org/reference/datamodel.html#customization
|
||||||
|
|
Loading…
Reference in a new issue