Skip to content

Commit

Permalink
Merge pull request #25619 from cachedout/lint_25578_2015_8
Browse files Browse the repository at this point in the history
Lint stateconf changes
  • Loading branch information
Mike Place committed Jul 22, 2015
2 parents 3fe4a75 + 2a45097 commit 2d697d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions salt/renderers/stateconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ def _local_to_abs_sid(sid, sls): # id must starts with '.'


def _relative_to_abs_sls(relative, sls):
""" Convert ``relative`` sls reference into absolute, relative to ``sls``.
"""
levels, suffix = re.match('^(\.+)(.*)$', relative).groups()
'''
Convert ``relative`` sls reference into absolute, relative to ``sls``.
'''
levels, suffix = re.match(r'^(\.+)(.*)$', relative).groups()
level_count = len(levels)
p_comps = sls.split('.')
if level_count > len(p_comps):
Expand Down
2 changes: 1 addition & 1 deletion salt/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@ def render_state(self, sls, saltenv, mods, matches, local=False):

if inc_sls.startswith('.'):
levels, include = \
re.match('^(\.+)(.*)$', inc_sls).groups()
re.match(r'^(\.+)(.*)$', inc_sls).groups()
level_count = len(levels)
p_comps = sls.split('.')
if state_data.get('source', '').endswith('/init.sls'):
Expand Down

0 comments on commit 2d697d6

Please sign in to comment.