From ff8042c5c39f01f164f946fe5cdec058dddb07f6 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 15 Oct 2014 19:18:12 -0400 Subject: [PATCH] Add python3 compat boilerplate to executor --- v2/ansible/executor/HostLog.py | 4 ++++ v2/ansible/executor/HostLogManager.py | 6 +++++- v2/ansible/executor/HostPlaybookIterator.py | 4 ++++ v2/ansible/executor/PlaybookExecutor.py | 4 ++++ v2/ansible/executor/TaskExecutor.py | 4 ++++ v2/ansible/executor/TaskQueueManager.py | 4 ++++ v2/ansible/executor/TaskResult.py | 5 +++++ v2/ansible/executor/TemplateEngine.py | 5 +++++ v2/ansible/executor/VariableCache.py | 5 +++++ v2/ansible/executor/VariableManager.py | 5 +++++ 10 files changed, 45 insertions(+), 1 deletion(-) diff --git a/v2/ansible/executor/HostLog.py b/v2/ansible/executor/HostLog.py index 21d3feb2bf..9c0565b199 100644 --- a/v2/ansible/executor/HostLog.py +++ b/v2/ansible/executor/HostLog.py @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class HostLog(object): def __init__(self, host): diff --git a/v2/ansible/executor/HostLogManager.py b/v2/ansible/executor/HostLogManager.py index 81cf520cf1..727d06ce59 100644 --- a/v2/ansible/executor/HostLogManager.py +++ b/v2/ansible/executor/HostLogManager.py @@ -15,7 +15,11 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -class HostLogManager(object): +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +class HostLogManager: def __init__(self): pass diff --git a/v2/ansible/executor/HostPlaybookIterator.py b/v2/ansible/executor/HostPlaybookIterator.py index 5292b6c72b..22189583f9 100644 --- a/v2/ansible/executor/HostPlaybookIterator.py +++ b/v2/ansible/executor/HostPlaybookIterator.py @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class HostPlaybookIterator(object): def __init__(self, host, playbook): diff --git a/v2/ansible/executor/PlaybookExecutor.py b/v2/ansible/executor/PlaybookExecutor.py index 7a7ed3d293..0f57b4bbed 100644 --- a/v2/ansible/executor/PlaybookExecutor.py +++ b/v2/ansible/executor/PlaybookExecutor.py @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class PlaybookExecutor(object): def __init__(self, list_of_plays=[]): diff --git a/v2/ansible/executor/TaskExecutor.py b/v2/ansible/executor/TaskExecutor.py index 0591931372..b3156bc262 100644 --- a/v2/ansible/executor/TaskExecutor.py +++ b/v2/ansible/executor/TaskExecutor.py @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class TaskExecutor(object): def __init__(self, task, host): diff --git a/v2/ansible/executor/TaskQueueManager.py b/v2/ansible/executor/TaskQueueManager.py index 1016f35104..93066f6b40 100644 --- a/v2/ansible/executor/TaskQueueManager.py +++ b/v2/ansible/executor/TaskQueueManager.py @@ -15,6 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class TaskQueueManagerHostPlaybookIterator(object): def __init__(self, host, playbook): diff --git a/v2/ansible/executor/TaskResult.py b/v2/ansible/executor/TaskResult.py index 1f84012e01..785fc45992 100644 --- a/v2/ansible/executor/TaskResult.py +++ b/v2/ansible/executor/TaskResult.py @@ -14,3 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + diff --git a/v2/ansible/executor/TemplateEngine.py b/v2/ansible/executor/TemplateEngine.py index 1f84012e01..785fc45992 100644 --- a/v2/ansible/executor/TemplateEngine.py +++ b/v2/ansible/executor/TemplateEngine.py @@ -14,3 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + diff --git a/v2/ansible/executor/VariableCache.py b/v2/ansible/executor/VariableCache.py index 1f84012e01..785fc45992 100644 --- a/v2/ansible/executor/VariableCache.py +++ b/v2/ansible/executor/VariableCache.py @@ -14,3 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + diff --git a/v2/ansible/executor/VariableManager.py b/v2/ansible/executor/VariableManager.py index 1f84012e01..785fc45992 100644 --- a/v2/ansible/executor/VariableManager.py +++ b/v2/ansible/executor/VariableManager.py @@ -14,3 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type +