From Dan Kenigsberg <dan...@redhat.com>:

Dan Kenigsberg has uploaded a new change for review.

Change subject: py3: make fileUtilsTests pass on Python 3
......................................................................

py3: make fileUtilsTests pass on Python 3

This patch takes StringTypes from six.

Change-Id: I294f83312fa2f73e2ba3560e17f264a3a4af0898
Signed-off-by: Dan Kenigsberg <dan...@redhat.com>
---
M lib/vdsm/storage/fileUtils.py
M tests/Makefile.am
2 files changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/67649/1

diff --git a/lib/vdsm/storage/fileUtils.py b/lib/vdsm/storage/fileUtils.py
index f447f8c..2e84d5f 100644
--- a/lib/vdsm/storage/fileUtils.py
+++ b/lib/vdsm/storage/fileUtils.py
@@ -33,7 +33,6 @@
 import stat
 import subprocess
 import sys
-import types
 
 import six
 
@@ -214,7 +213,7 @@
 
 
 def resolveUid(user):
-    if isinstance(user, types.StringTypes):
+    if isinstance(user, six.string_types):
         uid = pwd.getpwnam(user).pw_uid
     else:
         uid = int(user)
@@ -222,7 +221,7 @@
 
 
 def resolveGid(group):
-    if isinstance(group, types.StringTypes):
+    if isinstance(group, six.string_types):
         gid = grp.getgrnam(group).gr_gid
     else:
         gid = int(group)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e82e3aa..f3f7da2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -210,7 +210,6 @@
        storage_blockvolume_test.py \
        storage_fakelib_test.py \
        storage_filesd_test.py \
-       storage_fileutil_test.py \
        storage_filevolume_test.py \
        storage_guarded_test.py \
        storage_hsm_test.py \


-- 
To view, visit https://gerrit.ovirt.org/67649
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I294f83312fa2f73e2ba3560e17f264a3a4af0898
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <dan...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to