mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Missing import for ansible.errors (pylint)
This commit is contained in:
parent
b69f57d8a4
commit
65f6f76323
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue