diff options
Diffstat (limited to 'doc/examples/config.py')
| -rwxr-xr-x | doc/examples/config.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/examples/config.py b/doc/examples/config.py index 222c1331..337899f0 100755 --- a/doc/examples/config.py +++ b/doc/examples/config.py @@ -25,31 +25,31 @@ print "Command line is",sys.argv # Load the default configuration file, InitConfig() does this better.. Cnf.Set("config-file","/etc/apt/apt.conf"); # or Cnf["config-file"] = ".."; if posixpath.exists(Cnf.FindFile("config-file")): - apt_pkg.ReadConfigFile(Cnf,"/etc/apt/apt.conf"); + apt_pkg.ReadConfigFile(Cnf,"/etc/apt/apt.conf"); # Merge the command line arguments into the configuration space Arguments = [('h',"help","help"), ('v',"version","version"), ('q',"quiet","quiet","IntLevel"), ('c',"config-file","","ConfigFile"), - ('o',"option","","ArbItem")] + ('o',"option","","ArbItem")] print "FileNames",apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); print "Quiet level selected is",Cnf.FindI("quiet",0); # Do some stuff with it if Cnf.FindB("version",0) == 1: - print "Version selected - 1.1"; + print "Version selected - 1.1"; if Cnf.FindB("help",0) == 1: - print apt_pkg.Package,apt_pkg.Version,"for",apt_pkg.Architecture, \ - "compiled on",apt_pkg.Date,apt_pkg.Time; - print "Hi, I am the help text for this program"; - sys.exit(0); + print apt_pkg.Package,apt_pkg.Version,"for",apt_pkg.Architecture, \ + "compiled on",apt_pkg.Date,apt_pkg.Time; + print "Hi, I am the help text for this program"; + sys.exit(0); print "No help for you, try -h"; # Print the configuration space print "The Configuration space looks like:"; for I in Cnf.keys(): - print "%s \"%s\";"%(I,Cnf[I]); + print "%s \"%s\";"%(I,Cnf[I]); |
