forked from rpms/leapp-repository
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 21bf23c218966040d4c3104d04ce0bcc39d0fb3d Mon Sep 17 00:00:00 2001
|
|
From: Tomas Fratrik <tfratrik@redhat.com>
|
|
Date: Wed, 13 Aug 2025 11:36:36 +0200
|
|
Subject: [PATCH 33/55] pylint: duplicate-string-formatting-argument
|
|
|
|
Jira: RHELMISC-16038
|
|
---
|
|
.pylintrc | 1 -
|
|
repos/system_upgrade/common/libraries/fetch.py | 4 ++--
|
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/.pylintrc b/.pylintrc
|
|
index fd770061..aaa5d99e 100644
|
|
--- a/.pylintrc
|
|
+++ b/.pylintrc
|
|
@@ -51,7 +51,6 @@ disable=
|
|
super-with-arguments, # required in python 2
|
|
raise-missing-from, # no 'raise from' in python 2
|
|
use-a-generator, # cannot be modified because of Python2 support
|
|
- 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
|
|
diff --git a/repos/system_upgrade/common/libraries/fetch.py b/repos/system_upgrade/common/libraries/fetch.py
|
|
index 82bf4ff3..baf2c4eb 100644
|
|
--- a/repos/system_upgrade/common/libraries/fetch.py
|
|
+++ b/repos/system_upgrade/common/libraries/fetch.py
|
|
@@ -56,8 +56,8 @@ def _request_data(service_path, cert, proxies, timeout=REQUEST_TIMEOUT):
|
|
timeout = (timeout[0], timeout[1] + 10)
|
|
if attempt > MAX_ATTEMPTS:
|
|
logger.warning(
|
|
- 'Attempt {} of {} to get {} failed: {}.'
|
|
- .format(MAX_ATTEMPTS, MAX_ATTEMPTS, service_path, etype_msg)
|
|
+ 'Attempt {max} of {max} to get {service} failed: {error}.'
|
|
+ .format(max=MAX_ATTEMPTS, service=service_path, error=etype_msg)
|
|
)
|
|
raise
|
|
|
|
--
|
|
2.51.1
|
|
|