summaryrefslogtreecommitdiff
path: root/doc/examples/configisc.py
diff options
context:
space:
mode:
authorBen Finney <ben@benfinney.id.au>2008-05-16 16:50:38 +1000
committerBen Finney <ben@benfinney.id.au>2008-05-16 16:50:38 +1000
commitad7bc46acd80451de21ce58450edb0f4367a5c79 (patch)
tree12775f7901544a709f8d63079f1cd57fef00f5a8 /doc/examples/configisc.py
parenta953d82143f0ec979e18f17e8d9bbacbac954868 (diff)
downloadpython-apt-ad7bc46acd80451de21ce58450edb0f4367a5c79.tar.gz
Fix code indentation to 4 spaces, to conform with PEP 8.
Diffstat (limited to 'doc/examples/configisc.py')
-rwxr-xr-xdoc/examples/configisc.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/examples/configisc.py b/doc/examples/configisc.py
index 1773a919..45a9c7f6 100755
--- a/doc/examples/configisc.py
+++ b/doc/examples/configisc.py
@@ -13,8 +13,8 @@ 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();
apt_pkg.ReadConfigFileISC(Cnf,ConfigFile[0]);
@@ -26,14 +26,14 @@ apt_pkg.ReadConfigFileISC(Cnf,ConfigFile[0]);
# bind8 config file..
if Cnf.has_key("Zone"):
- print "Zones: ",Cnf.SubTree("zone").List();
- for I in Cnf.List("zone"):
- SubCnf = Cnf.SubTree(I);
- if SubCnf.Find("type") == "slave":
- print "Masters for %s: %s"%(SubCnf.MyTag(),SubCnf.ValueList("masters"));
+ print "Zones: ",Cnf.SubTree("zone").List();
+ for I in Cnf.List("zone"):
+ SubCnf = Cnf.SubTree(I);
+ if SubCnf.Find("type") == "slave":
+ print "Masters for %s: %s"%(SubCnf.MyTag(),SubCnf.ValueList("masters"));
else:
- print "Tree definitions:";
- for I in Cnf.List("tree"):
- 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"]);
+ print "Tree definitions:";
+ for I in Cnf.List("tree"):
+ 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"]);