[PATCH 7/9] Replace long usage with int (#1014220)
Martin Kolman
mkolman at redhat.com
Wed Jan 28 17:43:21 UTC 2015
The long data type has been removed in Python 3 and an int should
be enough for representing the Kernel tainted flag even on Python 2.
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
pyanaconda/iutil.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 0c59f71..87378f6 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -1004,9 +1004,9 @@ def is_unsupported_hw():
:rtype: bool
"""
try:
- tainted = long(open("/proc/sys/kernel/tainted").read())
+ tainted = int(open("/proc/sys/kernel/tainted").read())
except (IOError, ValueError):
- tainted = 0L
+ tainted = 0
status = bool(tainted & UNSUPPORTED_HW)
if status:
--
2.1.0
More information about the anaconda-patches
mailing list