mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #11058 from hulu/lxc-templates
avoid shadowing templates() within lxc module
This commit is contained in:
commit
a729a9619b
@ -707,14 +707,14 @@ def templates(templates_dir='/usr/share/lxc/templates'):
|
||||
|
||||
salt '*' lxc.templates
|
||||
'''
|
||||
templates = []
|
||||
templates_list = []
|
||||
san = re.compile('^lxc-')
|
||||
if os.path.isdir(templates_dir):
|
||||
templates.extend(
|
||||
templates_list.extend(
|
||||
[san.sub('', a) for a in os.listdir(templates_dir)]
|
||||
)
|
||||
templates.sort()
|
||||
return templates
|
||||
templates_list.sort()
|
||||
return templates_list
|
||||
|
||||
|
||||
def info(name):
|
||||
|
Loading…
Reference in New Issue
Block a user