[PATCH 04/11] Remove uses of the string module we don't need, ignore warnings on those we do.
Chris Lumens
clumens at redhat.com
Thu Apr 23 18:54:11 UTC 2015
---
blivet/size.py | 2 +-
blivet/zfcp.py | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/blivet/size.py b/blivet/size.py
index 95ba265..29d2cb6 100644
--- a/blivet/size.py
+++ b/blivet/size.py
@@ -20,7 +20,7 @@
# Red Hat Author(s): David Cantrell <dcantrell at redhat.com>
import re
-import string
+import string # pylint: disable=deprecated-module
import locale
import sys
from collections import namedtuple
diff --git a/blivet/zfcp.py b/blivet/zfcp.py
index 0b93e6f..92b9098 100644
--- a/blivet/zfcp.py
+++ b/blivet/zfcp.py
@@ -19,7 +19,7 @@
# Author(s): Karsten Hopp <karsten at redhat.com>
#
-import string
+import string # pylint: disable=deprecated-module
import os
from . import udev
from . import util
@@ -66,8 +66,8 @@ class ZFCPDevice:
if dev is None or dev == "":
return None
dev = dev.lower()
- bus = dev[:string.rfind(dev, ".") + 1]
- dev = dev[string.rfind(dev, ".") + 1:]
+ bus = dev[:dev.rfind(".") + 1]
+ dev = dev[dev.rfind(".") + 1:]
dev = "0" * (4 - len(dev)) + dev
if not len(bus):
return "0.0." + dev
@@ -220,7 +220,7 @@ class ZFCPDevice:
for line in lines:
if not line.startswith("Host"):
continue
- scsihost = string.split(line)
+ scsihost = line.split()
host = scsihost[1]
channel = "0"
devid = scsihost[5]
--
2.2.2
More information about the anaconda-patches
mailing list