mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
Assorted pylint fixes
This commit is contained in:
parent
8e0f95951d
commit
f9ab9b4d68
65 changed files with 343 additions and 473 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
# Copyright (c) 2016, Adfinis SyGroup AG
|
||||
# Copyright: (c) 2016, Adfinis SyGroup AG
|
||||
# Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
@ -479,13 +479,13 @@ def main():
|
|||
changed = False
|
||||
|
||||
obj = list(ldap_search(
|
||||
'(&(objectClass=univentionShare)(cn={}))'.format(name),
|
||||
'(&(objectClass=univentionShare)(cn={0}))'.format(name),
|
||||
attr=['cn']
|
||||
))
|
||||
|
||||
exists = bool(len(obj))
|
||||
container = 'cn=shares,ou={},{}'.format(module.params['ou'], base_dn())
|
||||
dn = 'cn={},{}'.format(name, container)
|
||||
container = 'cn=shares,ou={0},{1}'.format(module.params['ou'], base_dn())
|
||||
dn = 'cn={0},{1}'.format(name, container)
|
||||
|
||||
if state == 'present':
|
||||
try:
|
||||
|
@ -494,7 +494,7 @@ def main():
|
|||
else:
|
||||
obj = umc_module_for_edit('shares/share', dn)
|
||||
|
||||
module.params['printablename'] = '{} ({})'.format(name, module.params['host'])
|
||||
module.params['printablename'] = '{0} ({1})'.format(name, module.params['host'])
|
||||
for k in obj.keys():
|
||||
if module.params[k] is True:
|
||||
module.params[k] = '1'
|
||||
|
@ -516,7 +516,7 @@ def main():
|
|||
obj.modify()
|
||||
except Exception as err:
|
||||
module.fail_json(
|
||||
msg='Creating/editing share {} in {} failed: {}'.format(
|
||||
msg='Creating/editing share {0} in {1} failed: {2}'.format(
|
||||
name,
|
||||
container,
|
||||
err,
|
||||
|
@ -531,7 +531,7 @@ def main():
|
|||
changed = True
|
||||
except Exception as err:
|
||||
module.fail_json(
|
||||
msg='Removing share {} in {} failed: {}'.format(
|
||||
msg='Removing share {0} in {1} failed: {2}'.format(
|
||||
name,
|
||||
container,
|
||||
err,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue