summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/progress.py4
-rw-r--r--aptsources/sourceslist.py2
-rwxr-xr-xdoc/examples/config.py12
-rwxr-xr-xdoc/examples/configisc.py14
-rwxr-xr-xdoc/examples/versiontest.py20
-rwxr-xr-xsetup.py4
6 files changed, 28 insertions, 28 deletions
diff --git a/apt/progress.py b/apt/progress.py
index dbad8050..1f2d4e7c 100644
--- a/apt/progress.py
+++ b/apt/progress.py
@@ -132,12 +132,12 @@ class TextFetchProgress(FetchProgress):
def mediaChange(self, medium, drive):
""" react to media change events """
- res = True;
+ res = True
print "Media change: please insert the disc labeled \
'%s' in the drive '%s' and press enter" % (medium, drive)
s = sys.stdin.readline()
if(s == 'c' or s == 'C'):
- res = false;
+ res = false
return res
diff --git a/aptsources/sourceslist.py b/aptsources/sourceslist.py
index dfc0ccb6..6eb69f6e 100644
--- a/aptsources/sourceslist.py
+++ b/aptsources/sourceslist.py
@@ -297,7 +297,7 @@ class SourcesList:
# there isn't any matching source, so create a new line and parse it
line = "%s %s %s" % (type, uri, dist)
for c in comps:
- line = line + " " + c;
+ line = line + " " + c
if comment != "":
line = "%s #%s\n" % (line, comment)
line = line + "\n"
diff --git a/doc/examples/config.py b/doc/examples/config.py
index cd7bcae0..3a77301b 100755
--- a/doc/examples/config.py
+++ b/doc/examples/config.py
@@ -18,7 +18,7 @@ import apt_pkg, sys, posixpath
# configuration object apt_pkg.Config which is used interally by apt-pkg
# routines to control unusual situations. I recommend using the sytem global
# whenever possible..
-Cnf = apt_pkg.newConfiguration();
+Cnf = apt_pkg.newConfiguration()
print "Command line is", sys.argv
@@ -39,17 +39,17 @@ 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 "Hi, I am the help text for this program"
+ sys.exit(0)
-print "No help for you, try -h";
+print "No help for you, try -h"
# 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])
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"])
diff --git a/doc/examples/versiontest.py b/doc/examples/versiontest.py
index 29da3b8f..732eafac 100755
--- a/doc/examples/versiontest.py
+++ b/doc/examples/versiontest.py
@@ -2,25 +2,25 @@
# This is a simple clone of tests/versiontest.cc
import apt_pkg, sys, re, string
-apt_pkg.InitConfig();
-apt_pkg.InitSystem();
+apt_pkg.InitConfig()
+apt_pkg.InitSystem()
TestFile = apt_pkg.ParseCommandLine(apt_pkg.Config, [], sys.argv)
if len(TestFile) != 1:
- print "Must have exactly 1 file name";
- sys.exit(0);
+ print "Must have exactly 1 file name"
+ sys.exit(0)
# Go over the file..
List = open(TestFile[0], "r")
-CurLine = 0;
+CurLine = 0
while(1):
- Line = List.readline();
- CurLine = CurLine + 1;
+ Line = List.readline()
+ CurLine = CurLine + 1
if Line == "":
- break;
- Line = string.strip(Line);
+ break
+ Line = string.strip(Line)
if len(Line) == 0 or Line[0] == '#':
- continue;
+ continue
Split = re.split("[ \n]", Line)
diff --git a/setup.py b/setup.py
index 2c11d9d3..eef54773 100755
--- a/setup.py
+++ b/setup.py
@@ -9,12 +9,12 @@ import glob, os, string
# The apt_pkg module
files = map(lambda source: "python/"+source,
string.split(parse_makefile("python/makefile")["APT_PKG_SRC"]))
-apt_pkg = Extension("apt_pkg", files, libraries=["apt-pkg"]);
+apt_pkg = Extension("apt_pkg", files, libraries=["apt-pkg"])
# The apt_inst module
files = map(lambda source: "python/"+source,
string.split(parse_makefile("python/makefile")["APT_INST_SRC"]))
-apt_inst = Extension("apt_inst", files, libraries=["apt-pkg", "apt-inst"]);
+apt_inst = Extension("apt_inst", files, libraries=["apt-pkg", "apt-inst"])
# Replace the leading _ that is used in the templates for translation
templates = []