summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-25 11:39:50 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-25 11:39:50 -0400
commit70cc6bb182245d20c54afba79a265ef40f1ed080 (patch)
tree1d7c55357a0e8d10ac82d402f9965dc806c9705c /src/lib/Bcfg2/Server/Plugin
parent432f448983ff27452d82d62314d91c942f31bce5 (diff)
downloadbcfg2-70cc6bb182245d20c54afba79a265ef40f1ed080.tar.gz
bcfg2-70cc6bb182245d20c54afba79a265ef40f1ed080.tar.bz2
bcfg2-70cc6bb182245d20c54afba79a265ef40f1ed080.zip
Revert "Packages: properly implemented deepcopy() for PackagesSources objects"
This reverts commit 432f448983ff27452d82d62314d91c942f31bce5.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin')
-rw-r--r--src/lib/Bcfg2/Server/Plugin/helpers.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py
index 93f690e18..0b81077a3 100644
--- a/src/lib/Bcfg2/Server/Plugin/helpers.py
+++ b/src/lib/Bcfg2/Server/Plugin/helpers.py
@@ -1601,36 +1601,3 @@ class GroupSpool(Plugin, Generator):
return
reqid = self.core.fam.AddMonitor(name, self)
self.handles[reqid] = relative
-
-
-class DeepcopyMixin(object):
- """ Mixin that adds a __deepcopy__() function that tries to do the
- right thing by:
-
- #. Creating a new object of the same type by calling the
- constructor with the arguments returned by
- :func:`Bcfg2.Server.Plugin.helpers.DeepcopyMixin._deepcopy_constructor_args`;
- #. Individually copying each attribute of the original object that
- a) is not magical (``__whatever__``); b) is not callable; c) is
- not a property; and d) is not in
- :attr:`Bcfg2.Server.Plugin.helpers.DeepcopyMixin._deepcopy_exclude`.
- """
-
- #: Exclude the named attributes from the copy.
- _deepcopy_exclude = ["fam", "logger", "setup"]
-
- def _deepcopy_constructor_args(self):
- """ Get a tuple of arguments that will be passed to the
- constructor of this class to create a base object before the
- individual attributes are deepcopied. """
- raise NotImplementedError
-
- def __deepcopy__(self, memo):
- rv = self.__class__(*self._deepcopy_constructor_args())
- for attr in dir(self):
- if (not callable(getattr(self, attr)) and
- (not attr.startswith("__") or not attr.endswith("__")) and
- attr not in self._deepcopy_exclude and
- not isinstance(getattr(self.__class__, attr, None), property)):
- setattr(rv, attr, copy.deepcopy(getattr(self, attr), memo))
- return rv