Skip to content

Commit

Permalink
make pylint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMocary authored and pirat89 committed Oct 10, 2023
1 parent 4d8ad1c commit 37489fd
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ disable=
duplicate-string-formatting-argument, # TMP: will be fixed in close future
consider-using-f-string, # sorry, not gonna happen, still have to support py2
use-dict-literal,
redundant-u-string-prefix # still have py2 to support
redundant-u-string-prefix, # still have py2 to support
logging-format-interpolation,
logging-not-lazy

[FORMAT]
# Maximum number of characters on a single line.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _major_version_check(instance):
return False
return True
except (ValueError, IndexError):
api.current_logger().warn(
api.current_logger().warning(
'Failed to parse manifest release field for instance {}'.format(instance.name), exc_info=True)
return False

Expand Down Expand Up @@ -164,7 +164,7 @@ def _sp_rev_patchlevel_check(instance, patchlevels):
return True
return False
# if not 'len(number) > 2 and number.isdigit()'
api.current_logger().warn(
api.current_logger().warning(
'Invalid rev-number field value `{}` in manifest for instance {}'.format(number, instance.name))
return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def perform_target_iso_checks():
return

if next(requested_target_iso_msg_iter, None):
api.current_logger().warn('Received multiple msgs with target ISO to use.')
api.current_logger().warning('Received multiple msgs with target ISO to use.')

# Cascade the inhibiting conditions so that we do not spam the user with inhibitors
is_iso_invalid = inhibit_if_not_valid_iso_file(target_iso)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def produce_repofile_if_iso_used():
return

if next(target_iso_msgs_iter, None):
api.current_logger().warn('Received multiple TargetISInstallationImage messages, using the first one')
api.current_logger().warning('Received multiple TargetISInstallationImage messages, using the first one')

# Mounting was successful, create a repofile to copy into target userspace
repofile_entry_template = ('[{repoid}]\n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _find_deprecation_data_entries(lscpu):
if is_detected(lscpu, entry)
]

api.current_logger().warn('Unsupported platform could not detect relevant CPU information')
api.current_logger().warning('Unsupported platform could not detect relevant CPU information')
return []


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _decoded(s):
# Most likely an empty line, but we're being permissive here and ignore failures.
# In the end it's all about having the right values available.
if line:
api.current_logger().warn(
api.current_logger().warning(
'Failed to parse line in manifest: {file}. Line was: `{line}`'.format(file=path,
line=line),
exc_info=True)
Expand Down Expand Up @@ -128,6 +128,6 @@ def get_instance_status(instance_number, sapcontrol_path, admin_name):
# In that case there are always more than 7 lines.
return len(output['stdout'].split('\n')) > 7
except CalledProcessError:
api.current_logger().warn(
api.current_logger().warning(
'Failed to retrieve SAP HANA instance status from sapcontrol - Considering it as not running.')
return False
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def is_rh_release_pkg(pkg_name):
return '' # We did not determine anything

if len(redhat_release_pkgs) > 1:
api.current_logger().warn('Multiple packages with name redhat-release* found when '
'determining RHEL version of the supplied installation ISO.')
api.current_logger().warning('Multiple packages with name redhat-release* found when '
'determining RHEL version of the supplied installation ISO.')

redhat_release_pkg = redhat_release_pkgs[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _copy_certificates(context, target_userspace):

# The path original path of the broken symlink in the container
report_path = os.path.join(target_pki, os.path.relpath(src_path, backup_pki))
api.current_logger().warn('File {} is a broken symlink!'.format(report_path))
api.current_logger().warning('File {} is a broken symlink!'.format(report_path))
break

src_path = next_path
Expand Down

0 comments on commit 37489fd

Please sign in to comment.