Nir Soffer has uploaded a new change for review.

Change subject: correctness: Use new-style class when using @property
......................................................................

correctness: Use new-style class when using @property

Commit 802e88c60c added a @property to few historic old-style classes.
This works when reading the property value, but does not create a
read-only property as it should. To have a read-only property, the class
must be a new-style class (inherit from object). This patch converts
clientIf, Disaptcher and HSM to new-style classes.

For more info see:
https://docs.python.org/2.6/library/functions.html#property

Change-Id: I7ff98ff07832cb8236470071fcc85da3a0cfa2d2
Signed-off-by: Nir Soffer <[email protected]>
---
M vdsm/clientIF.py
M vdsm/storage/dispatcher.py
M vdsm/storage/hsm.py
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/28720/1

diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index a522ce1..e7facf8 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -54,7 +54,7 @@
     _glusterEnabled = False
 
 
-class clientIF:
+class clientIF(object):
     """
     The client interface of vdsm.
 
diff --git a/vdsm/storage/dispatcher.py b/vdsm/storage/dispatcher.py
index 6a1d317..06bd464 100644
--- a/vdsm/storage/dispatcher.py
+++ b/vdsm/storage/dispatcher.py
@@ -33,7 +33,7 @@
     return f
 
 
-class Dispatcher:
+class Dispatcher(object):
     log = logging.getLogger('Storage.Dispatcher')
 
     STATUS_OK = {'status': {'code': 0, 'message': "OK"}}
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index d2a8639..2c71a9c 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -246,7 +246,7 @@
     return storageServer.ConnectionInfo(typeName, params)
 
 
-class HSM:
+class HSM(object):
     """
     This is the HSM class. It controls all the stuff relate to the Host.
     Further more it doesn't change any pool metadata.


-- 
To view, visit http://gerrit.ovirt.org/28720
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ff98ff07832cb8236470071fcc85da3a0cfa2d2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to