ed508b4be8
- Resolves: RHEL-73022 A slow HSM can cause IPA server installation to fail setting up certificate tracking [rhel-9] - Resolves: RHEL-71261 [RHEL-9.6] Include latest fixes in python3-ipatests package - Resolves: RHEL-67191 CVE-2024-11029 ipa: Administrative user data leaked through systemd journal [rhel-9.6] - Resolves: RHEL-59040 KRA installation failure caused by a certificate mismatch in NSS DB and configuration file. Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
70 lines
2.6 KiB
Diff
70 lines
2.6 KiB
Diff
From eef544c1d331bbe80852ebe8b5fc9bad0539b6fa Mon Sep 17 00:00:00 2001
|
|
From: Florence Blanc-Renaud <flo@redhat.com>
|
|
Date: Wed, 15 Jan 2025 15:39:20 +0100
|
|
Subject: [PATCH] Fix pylint issue in ipatests/i18n.py
|
|
|
|
This file should not import ipa modules
|
|
|
|
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
|
|
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
|
|
---
|
|
ipatests/i18n.py | 8 ++++----
|
|
pylintrc | 3 ++-
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/ipatests/i18n.py b/ipatests/i18n.py
|
|
index 57915c286be72124fa23380f97f3922496f00c22..49f5c4c3232346db3147bd7a5ba8056344ac907f 100644
|
|
--- a/ipatests/i18n.py
|
|
+++ b/ipatests/i18n.py
|
|
@@ -22,6 +22,7 @@ from __future__ import print_function
|
|
|
|
# WARNING: Do not import ipa modules, this is also used as a
|
|
# stand-alone script (invoked from po Makefile).
|
|
+import optparse # pylint: disable=deprecated-module
|
|
import sys
|
|
import gettext
|
|
import re
|
|
@@ -29,7 +30,6 @@ import os
|
|
import traceback
|
|
import polib
|
|
from collections import namedtuple
|
|
-from ipapython import config
|
|
|
|
import six
|
|
|
|
@@ -722,9 +722,9 @@ usage ='''
|
|
def main():
|
|
global verbose, print_traceback, pedantic, show_strings
|
|
|
|
- parser = config.IPAOptionParser(usage=usage)
|
|
+ parser = optparse.OptionParser(usage=usage)
|
|
|
|
- mode_group = config.OptionGroup(parser, 'Operational Mode',
|
|
+ mode_group = optparse.OptionGroup(parser, 'Operational Mode',
|
|
'You must select one these modes to run in')
|
|
|
|
mode_group.add_option('-g', '--test-gettext', action='store_const', const='test_gettext', dest='mode',
|
|
@@ -748,7 +748,7 @@ def main():
|
|
parser.add_option('--traceback', action='store_true', dest='print_traceback', default=False,
|
|
help='print the traceback when an exception occurs')
|
|
|
|
- param_group = config.OptionGroup(parser, 'Run Time Parameters',
|
|
+ param_group = optparse.OptionGroup(parser, 'Run Time Parameters',
|
|
'These may be used to modify the run time defaults')
|
|
|
|
param_group.add_option('--test-lang', action='store', dest='test_lang', default='test',
|
|
diff --git a/pylintrc b/pylintrc
|
|
index 50278cc76031af68959a138f6ea185c4288c7155..8fadeffbdfdb8013135a17b3493ecc4dc7e5e001 100644
|
|
--- a/pylintrc
|
|
+++ b/pylintrc
|
|
@@ -153,4 +153,5 @@ forbidden-imports=
|
|
ipaplatform/:ipaclient:ipalib:ipaserver,
|
|
ipapython/:ipaclient:ipalib:ipaserver
|
|
ipatests/pytest_ipa:ipaserver:ipaclient.install:ipalib.install
|
|
- ipatests/test_integration:ipaserver
|
|
+ ipatests/test_integration:ipaserver,
|
|
+ ipatests/i18n.py:ipapython
|
|
--
|
|
2.47.1
|
|
|