From: Frank Brehm Date: Thu, 6 Sep 2018 10:31:05 +0000 (+0200) Subject: Bugfixing X-Git-Tag: 0.11.4^2~3 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=f5ef46758319ab77c4ef53fded5b0ec32ecd0236;p=pixelpark%2Fpuppetmaster-webhooks.git Bugfixing --- diff --git a/lib/webhooks/puppetfile.py b/lib/webhooks/puppetfile.py index 297166c..797da36 100644 --- a/lib/webhooks/puppetfile.py +++ b/lib/webhooks/puppetfile.py @@ -33,7 +33,7 @@ from .module_info import ModuleInfo from .module_list import ModuleInfoDict -__version__ = '0.3.1' +__version__ = '0.3.2' LOG = logging.getLogger(__name__) @@ -76,6 +76,12 @@ class Puppetfile(BaseObject): base_dir=base_dir, initialized=False, ) + if env_root_dir is not None: + self.env_root_dir = env_root_dir + + if environment is not None: + self.environment = environment + if initialized is not None: self.initialized = initialized @@ -271,11 +277,7 @@ class Puppetfile(BaseObject): appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, line=prev_line, env=self.environment) if module_info: - full_name = module_info.full_name - if full_name in modules: - modules[full_name].merge_in(module_info) - else: - modules[full_name] = module_info + modules.merge(module_info) prev_line = '' @@ -286,11 +288,7 @@ class Puppetfile(BaseObject): appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, line=prev_line, env=self.environment) if module_info: - full_name = module_info.full_name - if full_name in self.modules: - modules[full_name].merge_in(module_info) - else: - modules[full_name] = module_info + modules.merge(module_info) if self.verbose > 1: LOG.debug("Closing {!r} ...".format(self.filename))