summaryrefslogtreecommitdiff
path: root/doc/examples/configisc.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/configisc.py')
-rwxr-xr-xdoc/examples/configisc.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/examples/configisc.py b/doc/examples/configisc.py
index 4d0d33d4..9a858657 100755
--- a/doc/examples/configisc.py
+++ b/doc/examples/configisc.py
@@ -13,14 +13,14 @@ import apt_pkg, sys, posixpath
ConfigFile = apt_pkg.ParseCommandLine(apt_pkg.Config, [], sys.argv)
if len(ConfigFile) != 1:
- print "Must have exactly 1 file name";
- sys.exit(0);
+ print "Must have exactly 1 file name"
+ sys.exit(0)
-Cnf = apt_pkg.newConfiguration();
+Cnf = apt_pkg.newConfiguration()
apt_pkg.ReadConfigFileISC(Cnf, ConfigFile[0])
# Print the configuration space
-#print "The Configuration space looks like:";
+#print "The Configuration space looks like:"
#for I in Cnf.keys():
# print "%s \"%s\";" % (I, Cnf[I])
@@ -28,12 +28,12 @@ apt_pkg.ReadConfigFileISC(Cnf, ConfigFile[0])
if Cnf.has_key("Zone"):
print "Zones: ", Cnf.SubTree("zone").List()
for I in Cnf.List("zone"):
- SubCnf = Cnf.SubTree(I);
+ SubCnf = Cnf.SubTree(I)
if SubCnf.Find("type") == "slave":
print "Masters for %s: %s" % (SubCnf.MyTag(), SubCnf.ValueList("masters"))
else:
- print "Tree definitions:";
+ print "Tree definitions:"
for I in Cnf.List("tree"):
- SubCnf = Cnf.SubTree(I);
+ SubCnf = Cnf.SubTree(I)
# This could use Find which would eliminate the possibility of exceptions.
print "Subtree %s with sections '%s' and architectures '%s'" % (SubCnf.MyTag(), SubCnf["Sections"], SubCnf["Architectures"])