summaryrefslogtreecommitdiff
path: root/cloudinit/UserDataHandler.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-10-31 11:48:50 -0400
committerScott Moser <smoser@ubuntu.com>2011-10-31 11:48:50 -0400
commit853649450e74da37f98c0c1e8717cb25db3fab9b (patch)
treecdad2b9e736f69e2149a0f72ca772a2d646d3954 /cloudinit/UserDataHandler.py
parent2ba7c951a0e65e4421093cd785894548c3570da1 (diff)
downloadvyos-cloud-init-853649450e74da37f98c0c1e8717cb25db3fab9b.tar.gz
vyos-cloud-init-853649450e74da37f98c0c1e8717cb25db3fab9b.zip
use hashlib rather than md5 module to avoid deprecation warning.
Thanks: Garrett Holmstrom LP: #883367
Diffstat (limited to 'cloudinit/UserDataHandler.py')
-rw-r--r--cloudinit/UserDataHandler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py
index afd5dd99..982e57f0 100644
--- a/cloudinit/UserDataHandler.py
+++ b/cloudinit/UserDataHandler.py
@@ -24,7 +24,7 @@ from email import encoders
import yaml
import cloudinit
import cloudinit.util as util
-import md5
+import hashlib
starts_with_mappings={
'#include' : 'text/x-include-url',
@@ -66,7 +66,7 @@ def do_include(str,parts):
if line.startswith("#"): continue
# urls cannot not have leading or trailing white space
- msum = md5.new()
+ msum = hashlib.md5()
msum.update(line.strip())
includeonce_filename = "%s/urlcache/%s" % (
cloudinit.get_ipath_cur("data"), msum.hexdigest())