mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Add dropfile function to utils
This commit is contained in:
parent
f6fd94015e
commit
c9f5e30976
@ -965,6 +965,18 @@ def valid_url(url, protos):
|
||||
return False
|
||||
|
||||
|
||||
def dropfile():
|
||||
'''
|
||||
Set an aes dropfile to update the publish session key
|
||||
'''
|
||||
dfn = os.path.join(self.opts['cachedir'], '.dfn')
|
||||
aes = salt.crypt.Crypticle.generate_key_string()
|
||||
mask = os.umask(191)
|
||||
with open(dfn, 'w+') as fp_:
|
||||
fp_.write(aes)
|
||||
os.umask(mask)
|
||||
|
||||
|
||||
def parse_docstring(docstring):
|
||||
'''
|
||||
Parse a docstring into its parts.
|
||||
|
Loading…
Reference in New Issue
Block a user