[PATCH] Fix a couple other pylint problems in the driver disk tests.
by Chris Lumens
Most of this is just pylint not being able to import from the dracut/ directory
without being told how. Most of the rest is ignoring the interruptible system
call stuff in contexts where it doesn't matter.
---
dracut/driver_updates.py | 3 +++
tests/dracut_tests/test_driver_updates.py | 6 ++++--
tests/lib/mkdud.py | 6 +++++-
tests/testenv.sh | 4 ++--
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dracut/driver_updates.py b/dracut/driver_updates.py
index 0bf9648..e50eae9 100755
--- a/dracut/driver_updates.py
+++ b/dracut/driver_updates.py
@@ -63,6 +63,9 @@ During system installation, anaconda will install the packages listed in
/run/install/dd_packages to the target system.
"""
+# Ignore any interruptible calls
+# pylint: disable=interruptible-system-call
+
import logging
import sys
import os
diff --git a/tests/dracut_tests/test_driver_updates.py b/tests/dracut_tests/test_driver_updates.py
index 9b87c73..d4387f3 100644
--- a/tests/dracut_tests/test_driver_updates.py
+++ b/tests/dracut_tests/test_driver_updates.py
@@ -1,5 +1,8 @@
# test_driver_updates.py - unittests for driver_updates.py
+# Ignore any interruptible calls
+# pylint: disable=interruptible-system-call
+
import unittest
try:
import unittest.mock as mock
@@ -231,7 +234,7 @@ class TestSaveRepo(FileTestCaseBase):
def test_basic(self):
"""save_repo: copies a directory to /run/install/DD-X"""
makerepo(self.srcdir)
- [repo] = find_repos(self.srcdir)
+ repo = find_repos(self.srcdir)[0]
makefile(repo+'/fake-something.rpm')
saved = save_repo(repo, target=self.destdir)
self.assertEqual(set(os.listdir(saved)), set(["fake-something.rpm"]))
@@ -584,7 +587,6 @@ class DeviceInfoTestCase(unittest.TestCase):
# TODO: test TextMenu itself
# py2/3 compat
-import sys
if sys.version_info.major == 3:
from io import StringIO
else:
diff --git a/tests/lib/mkdud.py b/tests/lib/mkdud.py
index 1fb2b3c..3959ded 100755
--- a/tests/lib/mkdud.py
+++ b/tests/lib/mkdud.py
@@ -18,8 +18,12 @@
#
# Author: Will Woods <wwoods(a)redhat.com>
+# Ignore any interruptible calls
+# pylint: disable=interruptible-system-call
+
import os
-import rpmfluff
+# TODO: this pragma is temporary until there's a python3-rpmfluff
+import rpmfluff # pylint: disable=import-error
import subprocess
import argparse
import tempfile
diff --git a/tests/testenv.sh b/tests/testenv.sh
index cdc7c41..4b7b236 100644
--- a/tests/testenv.sh
+++ b/tests/testenv.sh
@@ -9,9 +9,9 @@ fi
: "${top_builddir:=$top_srcdir}"
if [ -z "$PYTHONPATH" ]; then
- PYTHONPATH="${top_builddir}/pyanaconda/isys/.libs:${top_srcdir}/pyanaconda:${top_srcdir}:${top_srcdir}/tests/lib"
+ PYTHONPATH="${top_builddir}/pyanaconda/isys/.libs:${top_srcdir}/pyanaconda:${top_srcdir}:${top_srcdir}/tests/lib:${top_srcdir}/dracut"
else
- PYTHONPATH="${PYTHONPATH}:${top_builddir}/pyanaconda/isys/.libs:${top_srcdir}/pyanaconda:${top_srcdir}:${top_srcdir}/tests/lib"
+ PYTHONPATH="${PYTHONPATH}:${top_builddir}/pyanaconda/isys/.libs:${top_srcdir}/pyanaconda:${top_srcdir}:${top_srcdir}/tests/lib:${top_srcdir}/dracut"
fi
if [ -z "$LD_LIBRARY_PATH" ]; then
--
2.4.3
8 years, 11 months
[rhel7-branch] Bump pykickstart version required. (#1241413)
by Samantha N. Bueno
Kickstart clearpart --cdl option for formatting DASDs requires a
newer pykickstart. Forgot to bump the version required in the spec
file.
Resolves: rhbz#1241413
---
anaconda.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index e921db3..e28bf8a 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -19,7 +19,7 @@ Source0: %{name}-%{version}.tar.bz2
# match the requires versions of things).
%define gettextver 0.18.1
%define intltoolver 0.31.2-3
-%define pykickstartver 1.99.66.4
+%define pykickstartver 1.99.66.5
%define yumver 3.4.3-91
%define partedver 1.8.1
%define pypartedver 2.5-2
--
2.1.0
8 years, 11 months
Updated: [rhinstaller/anaconda/pulls/190 rhel7-branch] rhel7 backports
by dashea
This is the commits from #181 and #182, backported for rhel7. The differences are minor but _just barely_ enough to make me want another quick review.
The differences from the above commits are:
- 231ac70: also reverts a66cb15
- 99c97dd: dnfpayload vs. yumpayload; the fix is the same, it's just in a different file.
- d844db8: resolve some parse-kickstart conflicts - `commands.network.RHEL7_Network` vs. `commands.network.F22_Network`, etc.
- faf2432: resolve conflict in dracut/module-setup.sh: RHEL7 doesn't have `PYTHONHASHSEED=42`
- 679448a: RHEL7 handles chronyd and ntpd; rather than checking to see if the files exist, just try to modify them - the worst that can happen (AFAICT) is a warning in the log. NBD.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/190
8 years, 11 months
Updated: [rhinstaller/anaconda/pulls/190 rhel7-branch] rhel7 backports
by dashea
This is the commits from #181 and #182, backported for rhel7. The differences are minor but _just barely_ enough to make me want another quick review.
The differences from the above commits are:
- 231ac70: also reverts a66cb15
- 99c97dd: dnfpayload vs. yumpayload; the fix is the same, it's just in a different file.
- d844db8: resolve some parse-kickstart conflicts - `commands.network.RHEL7_Network` vs. `commands.network.F22_Network`, etc.
- faf2432: resolve conflict in dracut/module-setup.sh: RHEL7 doesn't have `PYTHONHASHSEED=42`
- 679448a: RHEL7 handles chronyd and ntpd; rather than checking to see if the files exist, just try to modify them - the worst that can happen (AFAICT) is a warning in the log. NBD.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/190
8 years, 11 months
New: [rhinstaller/anaconda/pulls/190 rhel7-branch] rhel7 backports
by dashea
This is the commits from #181 and #182, backported for rhel7. The differences are minor but _just barely_ enough to make me want another quick review.
The differences from the above commits are:
- 231ac70: also reverts a66cb15
- 99c97dd: dnfpayload vs. yumpayload; the fix is the same, it's just in a different file.
- d844db8: resolve some parse-kickstart conflicts - `commands.network.RHEL7_Network` vs. `commands.network.F22_Network`, etc.
- faf2432: resolve conflict in dracut/module-setup.sh: RHEL7 doesn't have `PYTHONHASHSEED=42`
- 679448a: RHEL7 handles chronyd and ntpd; rather than checking to see if the files exist, just try to modify them - the worst that can happen (AFAICT) is a warning in the log. NBD.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/190
8 years, 11 months