Skip to content

Commit 002308d

Browse files
committed
make pylint happy
1 parent b167822 commit 002308d

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ disable=
5454
duplicate-string-formatting-argument, # TMP: will be fixed in close future
5555
consider-using-f-string, # sorry, not gonna happen, still have to support py2
5656
use-dict-literal,
57-
redundant-u-string-prefix # still have py2 to support
57+
redundant-u-string-prefix, # still have py2 to support
58+
logging-format-interpolation,
59+
logging-not-lazy
5860

5961
[FORMAT]
6062
# Maximum number of characters on a single line.

repos/system_upgrade/common/actors/checksaphana/libraries/checksaphana.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _major_version_check(instance):
132132
return False
133133
return True
134134
except (ValueError, IndexError):
135-
api.current_logger().warn(
135+
api.current_logger().warning(
136136
'Failed to parse manifest release field for instance {}'.format(instance.name), exc_info=True)
137137
return False
138138

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

repos/system_upgrade/common/actors/checktargetiso/libraries/check_target_iso.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def perform_target_iso_checks():
170170
return
171171

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

175175
# Cascade the inhibiting conditions so that we do not spam the user with inhibitors
176176
is_iso_invalid = inhibit_if_not_valid_iso_file(target_iso)

repos/system_upgrade/common/actors/createisorepofile/libraries/create_iso_repofile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def produce_repofile_if_iso_used():
1313
return
1414

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

1818
# Mounting was successful, create a repofile to copy into target userspace
1919
repofile_entry_template = ('[{repoid}]\n'

repos/system_upgrade/common/actors/scancpu/libraries/scancpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _find_deprecation_data_entries(lscpu):
133133
if is_detected(lscpu, entry)
134134
]
135135

136-
api.current_logger().warn('Unsupported platform could not detect relevant CPU information')
136+
api.current_logger().warning('Unsupported platform could not detect relevant CPU information')
137137
return []
138138

139139

repos/system_upgrade/common/actors/scansaphana/libraries/scansaphana.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _decoded(s):
3737
# Most likely an empty line, but we're being permissive here and ignore failures.
3838
# In the end it's all about having the right values available.
3939
if line:
40-
api.current_logger().warn(
40+
api.current_logger().warning(
4141
'Failed to parse line in manifest: {file}. Line was: `{line}`'.format(file=path,
4242
line=line),
4343
exc_info=True)
@@ -128,6 +128,6 @@ def get_instance_status(instance_number, sapcontrol_path, admin_name):
128128
# In that case there are always more than 7 lines.
129129
return len(output['stdout'].split('\n')) > 7
130130
except CalledProcessError:
131-
api.current_logger().warn(
131+
api.current_logger().warning(
132132
'Failed to retrieve SAP HANA instance status from sapcontrol - Considering it as not running.')
133133
return False

repos/system_upgrade/common/actors/scantargetiso/libraries/scan_target_os_iso.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def is_rh_release_pkg(pkg_name):
1818
return '' # We did not determine anything
1919

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

2424
redhat_release_pkg = redhat_release_pkgs[0]
2525

repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def _copy_certificates(context, target_userspace):
378378

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

384384
src_path = next_path

0 commit comments

Comments
 (0)