Cleanup some pyflakes warning (1 real error)

This commit is contained in:
Toshio Kuratomi 2015-10-19 11:42:46 -07:00
parent c6d44738ad
commit 0888d78b84
7 changed files with 8 additions and 9 deletions

View file

@ -26,7 +26,7 @@ except ImportError:
import json
from ansible import constants as C
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.parsing.utils.jsonify import jsonify
from ansible.plugins.cache.base import BaseCacheModule
from ansible.utils.unicode import to_bytes
@ -140,7 +140,7 @@ class CacheModule(BaseCacheModule):
pass
try:
os.remove("%s/%s" % (self._cache_dir, key))
except (OSError,IOError) as e:
except (OSError, IOError):
pass #TODO: only pass on non existing?
def flush(self):

View file

@ -17,7 +17,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.utils.listify import listify_lookup_plugin_terms

View file

@ -19,7 +19,6 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import *
from ansible.plugins.lookup import LookupBase
from ansible.inventory import Inventory

View file

@ -19,7 +19,7 @@ __metaclass__ = type
from re import compile as re_compile, IGNORECASE
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.parsing.splitter import parse_kv
from ansible.plugins.lookup import LookupBase

View file

@ -17,7 +17,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.utils.listify import listify_lookup_plugin_terms
from ansible.utils.boolean import boolean

View file

@ -19,7 +19,7 @@ __metaclass__ = type
from itertools import izip_longest
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.utils.listify import listify_lookup_plugin_terms
@ -44,7 +44,7 @@ class LookupModule(LookupBase):
my_list = terms[:]
if len(my_list) == 0:
raise errors.AnsibleError("with_together requires at least one element in each list")
raise AnsibleError("with_together requires at least one element in each list")
return [self._flatten(x) for x in izip_longest(*my_list, fillvalue=None)]

View file

@ -21,7 +21,7 @@ __metaclass__ = type
import time
from ansible.errors import *
from ansible.errors import AnsibleError
from ansible.playbook.included_file import IncludedFile
from ansible.plugins.strategy import StrategyBase