Commit 7661f86c by Brian Coca

backported fix of missing import

parent 54103d23
Subproject commit eda33a45e0e9595eca8da566b04fe8f41fbf1dd2
Subproject commit b138411671194e3ec236d8ec3d27bcf32447350d
Subproject commit a3ba1be3f11e8dd16658b592f1dcbe63cc9c9af0
Subproject commit 1276420a3a39340fcd9e053a1e621cdd89f480fa
......@@ -20,6 +20,8 @@ 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)
......@@ -63,7 +65,7 @@ def secure_hash(filename, hash_func=sha1):
block = infile.read(blocksize)
infile.close()
except IOError, 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment