inline whitespace fixes to comply w/ PEP 8

This commit is contained in:
Chris Rebert 2013-08-10 23:50:25 -07:00
parent bd6530b74c
commit a3c1c064a8
6 changed files with 8 additions and 8 deletions

View File

@ -350,7 +350,7 @@ class Client(object):
if url_data.username is not None:
_, netloc = url_data.netloc.split('@', 1)
fixed_url = urlunparse((url_data.scheme, netloc, url_data.path,
url_data.params, url_data.query, url_data.fragment ))
url_data.params, url_data.query, url_data.fragment))
passwd_mgr = url_passwd_mgr()
passwd_mgr.add_password(None, fixed_url, url_data.username, url_data.password)
auth_handler = url_auth_handler(passwd_mgr)

View File

@ -186,7 +186,7 @@ def meminfo():
comps = line.split()
comps[0] = comps[0].replace(':', '')
ret[comps[0]] = {
'value': comps[1],
'value': comps[1],
}
if len(comps) > 2:
ret[comps[0]]['unit'] = comps[2]

View File

@ -91,8 +91,8 @@ def add(path, index=0):
# validate index boundaries
if index < 0:
index = len(sysPath) + index
if index > len(sysPath)-1:
index = len(sysPath)-1
if index > len(sysPath) - 1:
index = len(sysPath) - 1
# Check if we are in the system path at the right location
try:

View File

@ -498,7 +498,7 @@ def get_offset():
if not reg:
ret = '0000'
else:
ret = reg.group(1).replace(':','')
ret = reg.group(1).replace(':', '')
return ret
@ -527,7 +527,7 @@ def set_zone(timezone):
salt '*' timezone.set_zone 'America/Denver'
'''
return __salt__['cmd.retcode']( 'tzutil /s "{0}"'.format(LINTOWIN[timezone]) ) == 0
return __salt__['cmd.retcode']('tzutil /s "{0}"'.format(LINTOWIN[timezone])) == 0
def zone_compare(timezone):

View File

@ -74,7 +74,7 @@ def __virtual__():
def _add_doc( func, doc, prefix='\n\n ' ):
if not func.__doc__:
func.__doc__ = ""
func.__doc__ += '{0}{1}'.format( prefix, doc )
func.__doc__ += '{0}{1}'.format(prefix, doc)
def _make_function(cmd_name, doc):
'''

View File

@ -15,7 +15,7 @@ def render(json_data, env='', sls='', **kws):
json_data = json_data.read()
if json_data.startswith('#!'):
json_data = json_data[json_data.find('\n')+1:]
json_data = json_data[(json_data.find('\n') + 1):]
if not json_data.strip():
return {}
return json.loads(json_data)