mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
allow spaces in cron env
This commit is contained in:
parent
c529ec8c34
commit
c480c11528
1 changed files with 7 additions and 7 deletions
|
@ -336,6 +336,13 @@ def list_tab(user):
|
|||
comment = comment_line
|
||||
else:
|
||||
comment += '\n' + comment_line
|
||||
elif line.find('=') > 0 and (' ' not in line or line.index('=') < line.index(' ')):
|
||||
# Appears to be a ENV setup line
|
||||
comps = line.split('=', 1)
|
||||
dat = {}
|
||||
dat['name'] = comps[0]
|
||||
dat['value'] = comps[1]
|
||||
ret['env'].append(dat)
|
||||
elif len(line.split(' ')) > 5:
|
||||
# Appears to be a standard cron line
|
||||
comps = line.split(' ')
|
||||
|
@ -354,13 +361,6 @@ def list_tab(user):
|
|||
identifier = None
|
||||
comment = None
|
||||
commented_cron_job = False
|
||||
elif line.find('=') > 0:
|
||||
# Appears to be a ENV setup line
|
||||
comps = line.split('=')
|
||||
dat = {}
|
||||
dat['name'] = comps[0]
|
||||
dat['value'] = ' '.join(comps[1:])
|
||||
ret['env'].append(dat)
|
||||
else:
|
||||
ret['pre'].append(line)
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue