From 061640050936bd35e1d21aa44bc47237cca9a0f4 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 20 Jul 2015 19:15:50 +0200 Subject: tools: Fix issue introduced in cd14868d with new parser for Options The new parser creates the the full plugin classes out of the options, so we need to use the __name__ attribute to get the name of the plugin and the directory containing the files in the repository. --- tools/upgrade/1.3/migrate_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/upgrade/1.3/migrate_info.py') diff --git a/tools/upgrade/1.3/migrate_info.py b/tools/upgrade/1.3/migrate_info.py index 7f3bb9a29..2f8035bcd 100755 --- a/tools/upgrade/1.3/migrate_info.py +++ b/tools/upgrade/1.3/migrate_info.py @@ -48,9 +48,11 @@ def main(): parser.parse() for plugin in Bcfg2.Options.setup.plugins: - if plugin not in ['SSLCA', 'Cfg', 'TGenshi', 'TCheetah', 'SSHbase']: + plugin_name = plugin.__name__ + if plugin_name not in ['SSLCA', 'Cfg', 'TGenshi', 'TCheetah', + 'SSHbase']: continue - datastore = os.path.join(Bcfg2.Options.setup.repository, plugin) + datastore = os.path.join(Bcfg2.Options.setup.repository, plugin_name) for root, dirs, files in os.walk(datastore): for fname in files: if fname in [":info", "info"]: -- cgit v1.2.3-1-g7c22