Irit Goihman has uploaded a new change for review.

Change subject: py3 tests: ported securableTests.py to python3
......................................................................

py3 tests: ported securableTests.py to python3

ported securable.py to python3 in order that securableTests.py
will be python3 compatible.

Change-Id: I7b41fd4fe95a068b5ed3a6bc0466496ff6a8c653
Signed-off-by: Irit Goihman <igoih...@redhat.com>
---
M lib/vdsm/storage/securable.py
M tests/Makefile.am
M tests/securableTests.py
3 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/59726/1

diff --git a/lib/vdsm/storage/securable.py b/lib/vdsm/storage/securable.py
index f1983a2..71db339 100644
--- a/lib/vdsm/storage/securable.py
+++ b/lib/vdsm/storage/securable.py
@@ -21,6 +21,7 @@
 from __future__ import absolute_import
 import inspect
 from functools import wraps
+import six
 
 OVERRIDE_ARG = "__securityOverride"
 SECURE_FIELD = "__secured__"
@@ -44,7 +45,7 @@
     if not callable(cls.__dict__.get(SECURE_METHOD_NAME)):
         raise NotImplementedError("Security method not implemented")
 
-    for name, value in cls.__dict__.iteritems():
+    for name, value in six.iteritems(cls.__dict__):
         # Skipping non callable attributes, special methods (including
         # SECURE_METHOD_NAME) and unsecured methods.
         if (not inspect.isfunction(value) or
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3394144..57ca6ba 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -214,7 +214,6 @@
        schemaTests.py \
        schemaValidationTest.py \
        sdm_indirection_tests.py \
-       securableTests.py \
        sparsifyTests.py \
        stompAdapterTests.py \
        stompAsyncClientTests.py \
diff --git a/tests/securableTests.py b/tests/securableTests.py
index a9c76e1..4ff40e3 100644
--- a/tests/securableTests.py
+++ b/tests/securableTests.py
@@ -18,6 +18,7 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+from __future__ import absolute_import
 from vdsm.storage.securable import secured, SecureError, unsecured
 from testlib import VdsmTestCase as TestCaseBase
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b41fd4fe95a068b5ed3a6bc0466496ff6a8c653
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoih...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to