diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-12-10 17:14:31 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-12-10 17:14:31 -0500 |
commit | edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0 (patch) | |
tree | 7aa3ae4b6e58c93e9a30d9615cba00a5c3259e9b /cobbler/collection.py | |
parent | b2be694e8ffa82f25e86b042e6c8fba922f3f439 (diff) | |
download | third_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.tar.gz third_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.tar.xz third_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.zip |
API and web svc now use seperate logging, and logging is greatly enhanced and more usable.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r-- | cobbler/collection.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py index 3f5b192..41154ab 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -35,6 +35,7 @@ class Collection(serializable.Serializable): """ self.config = config self.clear() + self.log_func = self.config.api.log def factory_produce(self,config,seed_data): """ @@ -112,6 +113,9 @@ class Collection(serializable.Serializable): So, in that case, don't run any triggers and don't deal with any actual files. """ + + + if ref is None or not ref.is_valid(): raise CX(_("insufficient or invalid arguments supplied")) @@ -125,6 +129,7 @@ class Collection(serializable.Serializable): # perform filesystem operations if with_copy: + self.log_func("saving %s %s" % (self.collection_type(), ref.name)) # failure of a pre trigger will prevent the object from being added if with_triggers: self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/pre/*" % self.collection_type()) |