diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-08-01 12:15:07 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-09-30 10:42:06 +0200 |
commit | 6e94d23a926ebbe456e183aac9e60a7119f0a502 (patch) | |
tree | 8efdf236713ed01a4215f72886e1df1eb4a1877e | |
parent | ce42bf282ff19c81062038b4100f7e576686b421 (diff) | |
download | freeipa-6e94d23a926ebbe456e183aac9e60a7119f0a502.tar.gz freeipa-6e94d23a926ebbe456e183aac9e60a7119f0a502.tar.xz freeipa-6e94d23a926ebbe456e183aac9e60a7119f0a502.zip |
hostgroup: Selected PEP8 fixes for the hostgroup plugin
Part of: https://fedorahosted.org/freeipa/ticket/3979
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r-- | ipalib/plugins/hostgroup.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index 489d310c2..fafe40ad9 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -67,6 +67,7 @@ def get_complete_hostgroup_member_list(hostgroup): register = Registry() + @register() class hostgroup(LDAPObject): """ @@ -177,7 +178,6 @@ class hostgroup(LDAPObject): entry_attrs['memberof'].remove(member) - @register() class hostgroup_add(LDAPCreate): __doc__ = _('Add a new hostgroup.') @@ -197,9 +197,9 @@ class hostgroup_add(LDAPCreate): # when enabled, a managed netgroup is created for every hostgroup # make sure that the netgroup can be created api.Object['netgroup'].get_dn_if_exists(keys[-1]) - raise errors.DuplicateEntry(message=unicode(_(\ - u'netgroup with name "%s" already exists. ' \ - u'Hostgroups and netgroups share a common namespace'\ + raise errors.DuplicateEntry(message=unicode(_( + u'netgroup with name "%s" already exists. ' + u'Hostgroups and netgroups share a common namespace' ) % keys[-1])) except errors.NotFound: pass @@ -217,8 +217,6 @@ class hostgroup_add(LDAPCreate): return dn - - @register() class hostgroup_del(LDAPDelete): __doc__ = _('Delete a hostgroup.') @@ -226,7 +224,6 @@ class hostgroup_del(LDAPDelete): msg_summary = _('Deleted hostgroup "%(value)s"') - @register() class hostgroup_mod(LDAPUpdate): __doc__ = _('Modify a hostgroup.') @@ -239,7 +236,6 @@ class hostgroup_mod(LDAPUpdate): return dn - @register() class hostgroup_find(LDAPSearch): __doc__ = _('Search for hostgroups.') @@ -257,7 +253,6 @@ class hostgroup_find(LDAPSearch): return truncated - @register() class hostgroup_show(LDAPRetrieve): __doc__ = _('Display information about a hostgroup.') @@ -268,7 +263,6 @@ class hostgroup_show(LDAPRetrieve): return dn - @register() class hostgroup_add_member(LDAPAddMember): __doc__ = _('Add members to a hostgroup.') @@ -279,7 +273,6 @@ class hostgroup_add_member(LDAPAddMember): return (completed, dn) - @register() class hostgroup_remove_member(LDAPRemoveMember): __doc__ = _('Remove members from a hostgroup.') |