Merge pull request #11058 from hulu/lxc-templates

avoid shadowing templates() within lxc module
This commit is contained in:
Thomas S Hatch 2014-03-07 15:17:25 -08:00
commit a729a9619b

View File

@ -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):