Skip to content

Commit

Permalink
* Address reviewr's comments
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Apr 9, 2021
1 parent 117c033 commit 93733f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/module_utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import traceback
import sys
import tempfile
import hashlib
from datetime import datetime
from distutils.version import LooseVersion

Expand Down Expand Up @@ -136,7 +137,6 @@ def get_default_cache_id(client):


def configuration_digest(configuration):
import hashlib
m = hashlib.sha256()
for k in AUTH_ARG_MAP:
if not hasattr(configuration, k):
Expand Down Expand Up @@ -217,8 +217,7 @@ def auth_set(*names):
return client

def generate_cache_file(kubeclient):
import hashlib
cache_file_name = 'k8srcp-{0}.json'.format(hashlib.sha1(get_default_cache_id(kubeclient)).hexdigest())
cache_file_name = 'k8srcp-{0}.json'.format(hashlib.sha256(get_default_cache_id(kubeclient)).hexdigest())
return os.path.join(tempfile.gettempdir(), cache_file_name)

kubeclient = kubernetes.client.ApiClient(configuration)
Expand Down

0 comments on commit 93733f4

Please sign in to comment.