From 65f6f76323e7a5fcb1461de6173f94fce6b41f89 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 14 Apr 2015 16:13:33 -0400 Subject: [PATCH] Missing import for ansible.errors (pylint) --- v2/ansible/utils/hashing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/ansible/utils/hashing.py b/v2/ansible/utils/hashing.py index 2c7dd534fcb..5e378db79f4 100644 --- a/v2/ansible/utils/hashing.py +++ b/v2/ansible/utils/hashing.py @@ -20,6 +20,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os +from ansible.errors import AnsibleError # Note, sha1 is the only hash algorithm compatible with python2.4 and with # FIPS-140 mode (as of 11-2014) @@ -65,7 +66,7 @@ def secure_hash(filename, hash_func=sha1): block = infile.read(blocksize) infile.close() except IOError as e: - raise errors.AnsibleError("error while accessing the file %s, error was: %s" % (filename, e)) + raise AnsibleError("error while accessing the file %s, error was: %s" % (filename, e)) return digest.hexdigest() # The checksum algorithm must match with the algorithm in ShellModule.checksum() method