summaryrefslogtreecommitdiffstats
path: root/cobbler/collection_distros.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-05-08 11:19:46 -0400
committerJim Meyering <jim@meyering.net>2006-05-08 11:19:46 -0400
commitfde48f2d1dc6412a0e9e483da8d197fd8c5d8e53 (patch)
tree1af94dc01339be06d7b339b87f55e87503052553 /cobbler/collection_distros.py
parentd3f5db5d15a74c9149d86a2a73317365d726beba (diff)
downloadthird_party-cobbler-fde48f2d1dc6412a0e9e483da8d197fd8c5d8e53.tar.gz
third_party-cobbler-fde48f2d1dc6412a0e9e483da8d197fd8c5d8e53.tar.xz
third_party-cobbler-fde48f2d1dc6412a0e9e483da8d197fd8c5d8e53.zip
PyChecker.
Diffstat (limited to 'cobbler/collection_distros.py')
-rw-r--r--cobbler/collection_distros.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/cobbler/collection_distros.py b/cobbler/collection_distros.py
index e700727..be024fc 100644
--- a/cobbler/collection_distros.py
+++ b/cobbler/collection_distros.py
@@ -1,19 +1,26 @@
+"""
+A distro represents a network bootable matched set of kernels
+and initrd files
+
+Michael DeHaan <mdehaan@redhat.com
+"""
import utils
import collection
import item_distro as distro
-import collection_profiles as profiles
-"""
-A distro represents a network bootable matched set of kernels
-and initrd files
-"""
class Distros(collection.Collection):
def factory_produce(self,config,seed_data):
+ """
+ Return a Distro forged from seed_data
+ """
return distro.Distro(config).from_datastruct(seed_data)
def filename(self):
+ """
+ Config file for distro serialization
+ """
return "/var/lib/cobbler/distros"
def remove(self,name):
@@ -21,7 +28,7 @@ class Distros(collection.Collection):
Remove element named 'name' from the collection
"""
# first see if any Groups use this distro
- for k,v in self.config.profiles().listing.items():
+ for v in self.config.profiles():
if v.distro == name:
utils.set_error("orphan_files")
return False