Skip to content

Commit

Permalink
Merge pull request saltstack#3448 from techhat/issue3446
Browse files Browse the repository at this point in the history
Apparently md5 is deprecated in favor of hashlib
  • Loading branch information
thatch45 committed Jan 25, 2013
2 parents 56d1f58 + 5eccb88 commit 38a002f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions salt/modules/timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import python libs
import os
import md5
import hashlib
import salt.utils
import logging

Expand Down Expand Up @@ -123,10 +123,10 @@ def zone_compare(timezone):
zonepath = '/usr/share/zoneinfo/{0}'.format(timezone)

with salt.utils.fopen(zonepath, 'r') as fp_:
usrzone = md5.new(fp_.read()).hexdigest()
usrzone = hashlib.md5(fp_.read()).hexdigest()

with salt.utils.fopen('/etc/localtime', 'r') as fp_:
etczone = md5.new(fp_.read()).hexdigest()
etczone = hashlib.md5(fp_.read()).hexdigest()

if usrzone == etczone:
return True
Expand Down

0 comments on commit 38a002f

Please sign in to comment.