Clean up the sls finder

This commit is contained in:
Thomas S Hatch 2011-05-28 22:45:49 -06:00
parent 51553b4fca
commit 954ced77b9

View file

@ -433,11 +433,11 @@ class FileClient(object):
return the location of the file
'''
if sls.count('.'):
root = sls.replace('.', '/')
for path in [root + '.sls', os.path.join(root, 'init.sls')]:
dest = self.cache_file(path, env)
if dest:
return dest
sls = sls.replace('.', '/')
for path in [sls + '.sls', os.path.join(sls, 'init.sls')]:
dest = self.cache_file(path, env)
if dest:
return dest
return False
def master_opts(self):