Skip to content

Commit

Permalink
Add function to generate the hash of the thin tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
thatch45 committed Oct 12, 2013
1 parent 8f92b6b commit c58e568
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions salt/utils/thin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# Import salt libs
import salt
import salt.utils

SALTCALL = '''
from salt.scripts import salt_call
Expand Down Expand Up @@ -69,3 +70,11 @@ def gen_thin(cachedir):
os.chdir(start_dir)
tfp.close()
return thintar


def thin_sum(cachedir, form='sha1'):
'''
Return the checksum of the current thin tarball
'''
thintar = gen_thin(cachedir)
return salt.utils.get_hash(thintar, form)

0 comments on commit c58e568

Please sign in to comment.