From 58c940b5c0f3c6c751094a3dd49855209a3e55ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 24 Feb 2017 00:38:15 +0100 Subject: [PATCH] Rename qubesmgmt.property.DEFAULT to qubesmgmt.DEFAULT Don't shadow builtin 'property' type. We don't need to kee compatibility with actual core3 implementation yet, so don't make the same mistake twice. --- qubesmgmt/__init__.py | 6 ++---- qubesmgmt/tests/vm/properties.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/qubesmgmt/__init__.py b/qubesmgmt/__init__.py index 5c0d4c9..b2ad1d0 100644 --- a/qubesmgmt/__init__.py +++ b/qubesmgmt/__init__.py @@ -24,9 +24,7 @@ import os import qubesmgmt.exc - -class property(object): - DEFAULT = object() +DEFAULT = object() class PropertyHolder(object): @@ -124,7 +122,7 @@ class PropertyHolder(object): def __setattr__(self, key, value): if key.startswith('_') or key in dir(self): return super(PropertyHolder, self).__setattr__(key, value) - if value is property.DEFAULT: + if value is DEFAULT: self._do_qubesd_call( self._method_dest, self._method_prefix + 'Reset', diff --git a/qubesmgmt/tests/vm/properties.py b/qubesmgmt/tests/vm/properties.py index ae5d867..1247e7c 100644 --- a/qubesmgmt/tests/vm/properties.py +++ b/qubesmgmt/tests/vm/properties.py @@ -121,7 +121,7 @@ class TC_00_Properties(qubesmgmt.tests.vm.VMTestCase): self.app.expected_calls[ ('test-vm', 'mgmt.vm.property.Reset', 'prop1', None)] = \ b'0\x00' - self.vm.prop1 = qubesmgmt.property.DEFAULT + self.vm.prop1 = qubesmgmt.DEFAULT self.assertAllCalled() def test_031_reset(self):