From 6c7e30b4d6c1e00598a49f3b1917570eb18460b3 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 10 Sep 2013 21:38:14 -0700 Subject: [PATCH] fix all pylint trailing-whitespace errors --- salt/master.py | 4 ++-- salt/modules/file.py | 2 +- salt/modules/rabbitmq.py | 2 +- salt/modules/tomcat.py | 2 +- salt/states/alternatives.py | 6 +++--- salt/states/file.py | 12 ++++++------ salt/states/keystone.py | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/salt/master.py b/salt/master.py index b6f9beaf41..4bb7f131a4 100644 --- a/salt/master.py +++ b/salt/master.py @@ -1896,7 +1896,7 @@ class ClearFuncs(object): self.event.fire_event(data, tagify([jid, 'new'], 'wheel')) ret = self.wheel_.call_func(fun, **clear_load.get('kwarg', {})) data['ret'] = ret - self.event.fire_event(data, tagify([jid, 'ret'], 'wheel')) + self.event.fire_event(data, tagify([jid, 'ret'], 'wheel')) return data except Exception as exc: log.error(exc) @@ -1915,7 +1915,7 @@ class ClearFuncs(object): 'user {0}.').format(clear_load.get('username', 'UNKNOWN')) log.warning(msg) return '' - + try: name = self.loadauth.load_name(clear_load) if not ((name in self.opts['external_auth'][clear_load['eauth']]) | ('*' in self.opts['external_auth'][clear_load['eauth']])): diff --git a/salt/modules/file.py b/salt/modules/file.py index f4e9704055..8c0bb7bb56 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -1,5 +1,5 @@ ''' -Manage information about regular files, directories, +Manage information about regular files, directories, and special files on the minion, set/read user, group, mode, and data ''' diff --git a/salt/modules/rabbitmq.py b/salt/modules/rabbitmq.py index 9225ef8024..c6b3ad76e2 100644 --- a/salt/modules/rabbitmq.py +++ b/salt/modules/rabbitmq.py @@ -378,7 +378,7 @@ def list_queues_vhost(vhost, *kwargs): def list_policies(runas=None): ''' - Return a dictionary of policies nested by vhost and name + Return a dictionary of policies nested by vhost and name based on the data returned from rabbitmqctl list_policies. Reference: http://www.rabbitmq.com/ha.html diff --git a/salt/modules/tomcat.py b/salt/modules/tomcat.py index 5758ee9692..b062fb6fa4 100644 --- a/salt/modules/tomcat.py +++ b/salt/modules/tomcat.py @@ -166,7 +166,7 @@ def _wget(cmd, opts=None, url='http://localhost:8080/manager', timeout=180): ret['msg'] = urllib2.urlopen(url6, timeout=timeout).read().splitlines() except Exception: ret['msg'] = 'Failed to create HTTP request' - + if not ret['msg'][0].startswith('OK'): ret['res'] = False diff --git a/salt/states/alternatives.py b/salt/states/alternatives.py index 7d6326e2a1..8d9b13424d 100644 --- a/salt/states/alternatives.py +++ b/salt/states/alternatives.py @@ -144,7 +144,7 @@ def auto(name): if line.endswith(' auto mode'): ret['comment'] = '{0} already in auto mode'.format(name) return ret - + ret['changes']['result'] = __salt__['alternatives.auto'](name) return ret @@ -172,14 +172,14 @@ def set(name, path): if current == path: ret['comment'] = 'Alternative for {0} already set to {1}'.format(name, path) return ret - + display = __salt__['alternatives.display'](name) isinstalled = False for line in display.splitlines(): if line.startswith(path): isinstalled = True break - + if isinstalled: __salt__['alternatives.set'](name, path) current = __salt__['alternatives.show_current'](name) diff --git a/salt/states/file.py b/salt/states/file.py index 992ca68a49..646529e37f 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -64,13 +64,13 @@ In this example ``foo.conf`` in the ``dev`` environment will be used instead. .. warning:: - When using a mode that includes a leading zero you must wrap the + When using a mode that includes a leading zero you must wrap the value in single quotes. If the value is not wrapped in quotes it will be read by YAML as an integer and evaluated as an octal. Special files can be managed via the ``mknod`` function. This function will create and enforce the permissions on a special file. The function supports the -creation of character devices, block devices, and fifo pipes. The function will +creation of character devices, block devices, and fifo pipes. The function will create the directory structure up to the special file if it is needed on the minion. The function will not overwrite or operate on (change major/minor numbers) existing special files with the exception of user, group, and @@ -2468,9 +2468,9 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'): Create a special file similar to the 'nix mknod command. The supported device types are p (fifo pipe), c (character device), and b (block device). Provide the major and minor numbers when specifying a character device or block device. A fifo pipe does not require - this information. The command will create the necessary dirs if needed. If a file of the + this information. The command will create the necessary dirs if needed. If a file of the same name not of the same type/major/minor exists, it will not be overwritten or unlinked - (deleted). This is logically in place as a safety measure because you can really shoot + (deleted). This is logically in place as a safety measure because you can really shoot yourself in the foot here and it is the behavior of 'nix mknod. It is also important to note that not just anyone can create special devices. Usually this is only done as root. If the state is executed as none other than root on a minion, you may recieve a permision @@ -2509,7 +2509,7 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'): - user: root - group: root - mode: 660 - + /dev/blk: file.mknod: - ntype: b @@ -2518,7 +2518,7 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'): - user: root - group: root - mode: 660 - + /dev/fifo: file.mknod: - ntype: p diff --git a/salt/states/keystone.py b/salt/states/keystone.py index cc076433b4..1a497fd36f 100644 --- a/salt/states/keystone.py +++ b/salt/states/keystone.py @@ -117,7 +117,7 @@ def tenant_present(name, description=None, enabled=True): # Check if user is already present tenant = __salt__['keystone.tenant_get'](name=name) - + if 'Error' not in tenant: if tenant[name]['description'] != description: __salt__['keystone.tenant_update'](name, description, enabled)