Lint: Add index numbers to format {} calls

This commit is contained in:
rallytime 2017-06-08 12:32:00 -06:00
parent 384570384e
commit 81413896d1

View File

@ -304,8 +304,8 @@ def list_(pkg=None, dir=None, runas=None, env=None, depth=None):
if depth is not None:
if not isinstance(depth, (int, float)):
raise salt.exceptions.SaltInvocationError('Error: depth {} must be a number'.format(depth))
cmd.append('--depth={}'.format(int(depth)))
raise salt.exceptions.SaltInvocationError('Error: depth {0} must be a number'.format(depth))
cmd.append('--depth={0}'.format(int(depth)))
if pkg:
# Protect against injection