From 0d6535242db07968206b3af15046f62a30748449 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 20 Feb 2017 17:36:36 +0100 Subject: Fix validation of generated code Importing modules with the same name will not reload an already imported module. Explicitly reloading the module is the quickest fix. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 372aca9ff..2ad26110b 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ import yaml from setuptools import setup, Command from setuptools_lint.setuptools_command import PylintCommand from six import string_types +from six.moves import reload_module from yamllint.config import YamlLintConfig from yamllint.cli import Format from yamllint import linter @@ -185,6 +186,7 @@ class OpenShiftAnsibleGenerateValidation(Command): # the python path. # pylint: disable=import-error import generate + reload_module(generate) generate.verify() except generate.GenerateAnsibleException as gae: print(gae.args) -- cgit v1.2.3