diff options
-rwxr-xr-x | install/tools/ipa-httpd-kdcproxy | 10 | ||||
-rw-r--r-- | ipa-client/ipaclient/ipadiscovery.py | 6 | ||||
-rw-r--r-- | ipalib/plugins/dns.py | 2 | ||||
-rw-r--r-- | ipalib/plugins/migration.py | 16 | ||||
-rw-r--r-- | ipalib/plugins/passwd.py | 2 | ||||
-rw-r--r-- | ipalib/plugins/permission.py | 4 | ||||
-rw-r--r-- | ipaserver/dcerpc.py | 2 | ||||
-rw-r--r-- | ipaserver/install/ipa_otptoken_import.py | 2 | ||||
-rw-r--r-- | ipaserver/install/ipa_replica_prepare.py | 2 | ||||
-rw-r--r-- | ipaserver/install/ipa_restore.py | 2 | ||||
-rw-r--r-- | ipatests/pytest_plugins/integration.py | 2 |
11 files changed, 25 insertions, 25 deletions
diff --git a/install/tools/ipa-httpd-kdcproxy b/install/tools/ipa-httpd-kdcproxy index 5e9863f8b..5e67f61a6 100755 --- a/install/tools/ipa-httpd-kdcproxy +++ b/install/tools/ipa-httpd-kdcproxy @@ -141,7 +141,7 @@ class KDCProxyConfig(object): try: valid = self.validate_symlink() except ConfigFileError as e: - self.log.warn("Cannot enable KDC proxy: %s " % e) + self.log.warning("Cannot enable KDC proxy: %s " % e) return False if valid: @@ -149,7 +149,7 @@ class KDCProxyConfig(object): return True if not os.path.isfile(self.conf): - self.log.warn("'%s' does not exist", self.conf) + self.log.warning("'%s' does not exist", self.conf) return False # create the symbolic link @@ -163,7 +163,7 @@ class KDCProxyConfig(object): try: valid = self.validate_symlink() except CheckError as e: - self.log.warn("Cannot disable KDC proxy: %s " % e) + self.log.warning("Cannot disable KDC proxy: %s " % e) return False if valid: @@ -203,8 +203,8 @@ def main(debug=DEBUG, time_limit=TIME_LIMIT): api.log.info('KDC proxy disabled') return 0 except CheckError as e: - api.log.warn(str(e)) - api.log.warn('Disabling KDC proxy') + api.log.warning(str(e)) + api.log.warning('Disabling KDC proxy') cfg.remove_symlink() return 0 except Exception as e: diff --git a/ipa-client/ipaclient/ipadiscovery.py b/ipa-client/ipaclient/ipadiscovery.py index 2e51293c2..45a71e190 100644 --- a/ipa-client/ipaclient/ipadiscovery.py +++ b/ipa-client/ipaclient/ipadiscovery.py @@ -266,14 +266,14 @@ class IPADiscovery(object): # via DNS break elif ldapret[0] == NOT_IPA_SERVER: - root_logger.warn( + root_logger.warning( 'Skip %s: not an IPA server', server) elif ldapret[0] == NO_LDAP_SERVER: - root_logger.warn( + root_logger.warning( 'Skip %s: LDAP server is not responding, unable to verify if ' 'this is an IPA server', server) else: - root_logger.warn( + root_logger.warning( 'Skip %s: cannot verify if this is an IPA server', server) # If one of LDAP servers checked rejects access (maybe anonymous diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 59cb0ea39..55f2609d7 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -3514,7 +3514,7 @@ class dnsrecord(LDAPObject): except dns.resolver.NoNameservers as e: # Do not raise exception if we have got SERVFAILs. # Maybe the user has created an invalid zone intentionally. - self.log.warn('waiting for DNS answer {%s}: got {%s}; ' + self.log.warning('waiting for DNS answer {%s}: got {%s}; ' 'ignoring', ldap_rrset, type(e)) continue diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py index 59c49fae5..f19324f0e 100644 --- a/ipalib/plugins/migration.py +++ b/ipalib/plugins/migration.py @@ -168,7 +168,7 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs # See if the gidNumber at least points to a valid group on the remote # server. if entry_attrs['gidnumber'][0] in invalid_gids: - api.log.warn('GID number %s of migrated user %s does not point to a known group.' \ + api.log.warning('GID number %s of migrated user %s does not point to a known group.' \ % (entry_attrs['gidnumber'][0], pkey)) elif entry_attrs['gidnumber'][0] not in valid_gids: try: @@ -178,15 +178,15 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs ) valid_gids.add(entry_attrs['gidnumber'][0]) except errors.NotFound: - api.log.warn('GID number %s of migrated user %s does not point to a known group.' \ + api.log.warning('GID number %s of migrated user %s does not point to a known group.' \ % (entry_attrs['gidnumber'][0], pkey)) invalid_gids.add(entry_attrs['gidnumber'][0]) except errors.SingleMatchExpected as e: # GID number matched more groups, this should not happen - api.log.warn('GID number %s of migrated user %s should match 1 group, but it matched %d groups' \ + api.log.warning('GID number %s of migrated user %s should match 1 group, but it matched %d groups' \ % (entry_attrs['gidnumber'][0], pkey, e.found)) except errors.LimitsExceeded as e: - api.log.warn('Search limit exceeded searching for GID %s' % entry_attrs['gidnumber'][0]) + api.log.warning('Search limit exceeded searching for GID %s' % entry_attrs['gidnumber'][0]) # We don't want to create a UPG so set the magic value in description # to let the DS plugin know. @@ -246,14 +246,14 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs try: value = DN(value) except ValueError as e: - api.log.warn('%s: skipping normalization of value %s of type %s ' + api.log.warning('%s: skipping normalization of value %s of type %s ' 'in attribute %s which could not be converted to DN: %s', pkey, value, type(value), attr, e) continue try: remote_entry = ds_ldap.get_entry(value, [api.Object.user.primary_key.name, api.Object.group.primary_key.name]) except errors.NotFound: - api.log.warn('%s: attribute %s refers to non-existent entry %s' % (pkey, attr, value)) + api.log.warning('%s: attribute %s refers to non-existent entry %s' % (pkey, attr, value)) continue if value.endswith(search_bases['user']): primary_key = api.Object.user.primary_key.name @@ -262,11 +262,11 @@ def _pre_migrate_user(ldap, pkey, dn, entry_attrs, failed, config, ctx, **kwargs primary_key = api.Object.group.primary_key.name container = api.env.container_group else: - api.log.warn('%s: value %s in attribute %s does not belong into any known container' % (pkey, value, attr)) + api.log.warning('%s: value %s in attribute %s does not belong into any known container' % (pkey, value, attr)) continue if not remote_entry.get(primary_key): - api.log.warn('%s: there is no primary key %s to migrate for %s' % (pkey, primary_key, attr)) + api.log.warning('%s: there is no primary key %s to migrate for %s' % (pkey, primary_key, attr)) continue api.log.debug('converting DN value %s for %s in %s' % (value, attr, dn)) diff --git a/ipalib/plugins/passwd.py b/ipalib/plugins/passwd.py index 2f303472c..b6f149932 100644 --- a/ipalib/plugins/passwd.py +++ b/ipalib/plugins/passwd.py @@ -123,7 +123,7 @@ class passwd(Command): if principal == getattr(context, 'principal') and \ current_password == MAGIC_VALUE: # No cheating - self.log.warn('User attempted to change password using magic value') + self.log.warning('User attempted to change password using magic value') raise errors.ACIError(info=_('Invalid credentials')) if current_password == MAGIC_VALUE: diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py index cbc48f5e8..2312008fa 100644 --- a/ipalib/plugins/permission.py +++ b/ipalib/plugins/permission.py @@ -1209,7 +1209,7 @@ class permission_mod(baseldap.LDAPUpdate): # Try to roll back the old ACI entry, old_aci_string = old_aci_info if old_aci_string: - self.log.warn('Reverting ACI on %s to %s' % (entry.dn, + self.log.warning('Reverting ACI on %s to %s' % (entry.dn, old_aci_string)) entry['aci'].append(old_aci_string) self.Backend.ldap2.update_entry(entry) @@ -1227,7 +1227,7 @@ class permission_mod(baseldap.LDAPUpdate): entry.pop('attributelevelrights', None) self.log.error('Error updating ACI: %s' % traceback.format_exc()) - self.log.warn('Reverting entry') + self.log.warning('Reverting entry') old_entry.reset_modlist(entry) ldap.update_entry(old_entry) self._revert_aci() diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py index eb646b8af..6b62b5fea 100644 --- a/ipaserver/dcerpc.py +++ b/ipaserver/dcerpc.py @@ -218,7 +218,7 @@ class DomainValidator(object): except KeyError as e: # Some piece of trusted domain info in LDAP is missing # Skip the domain, but leave log entry for investigation - api.log.warn("Trusted domain '%s' entry misses an " + api.log.warning("Trusted domain '%s' entry misses an " "attribute: %s", entry.dn, e) continue diff --git a/ipaserver/install/ipa_otptoken_import.py b/ipaserver/install/ipa_otptoken_import.py index 8ea67fce1..64670a6ff 100644 --- a/ipaserver/install/ipa_otptoken_import.py +++ b/ipaserver/install/ipa_otptoken_import.py @@ -523,7 +523,7 @@ class OTPTokenImport(admintool.AdminTool): try: api.Command.otptoken_add(keypkg.id, no_qrcode=True, **keypkg.options) except Exception as e: - self.log.warn("Error adding token: %s", e) + self.log.warning("Error adding token: %s", e) else: self.log.info("Added token: %s", keypkg.id) keypkg.remove() diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py index e9fd2d91d..17d203220 100644 --- a/ipaserver/install/ipa_replica_prepare.py +++ b/ipaserver/install/ipa_replica_prepare.py @@ -541,7 +541,7 @@ class ReplicaPrepare(admintool.AdminTool): except exceptions: return False except Exception as e: - self.log.warn('Exception while waiting for DNS record: %s: %s', + self.log.warning('Exception while waiting for DNS record: %s: %s', type(e).__name__, e) return True diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index b223bd287..2c53f038b 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -366,7 +366,7 @@ class Restore(admintool.AdminTool): self.log.info('Stopping IPA services') result = run(['ipactl', 'stop'], raiseonerr=False) if result.returncode not in [0, 6]: - self.log.warn('Stopping IPA failed: %s' % result.error_log) + self.log.warning('Stopping IPA failed: %s' % result.error_log) self.restore_selinux_booleans() diff --git a/ipatests/pytest_plugins/integration.py b/ipatests/pytest_plugins/integration.py index 5ece99680..a191d8486 100644 --- a/ipatests/pytest_plugins/integration.py +++ b/ipatests/pytest_plugins/integration.py @@ -94,7 +94,7 @@ def collect_logs(name, logs_dict, logfile_dir=None, beakerlib_plugin=None): cmd = host.run_command(['tar', 'cJv'] + logs, log_stdout=False, raiseonerr=False) if cmd.returncode: - log.warn('Could not collect all requested logs') + log.warning('Could not collect all requested logs') # Unpack on the local side dirname = os.path.join(topdirname, host.hostname) |