diff options
| author | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
|---|---|---|
| committer | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
| commit | ad7bc46acd80451de21ce58450edb0f4367a5c79 (patch) | |
| tree | 12775f7901544a709f8d63079f1cd57fef00f5a8 /doc/examples/inst.py | |
| parent | a953d82143f0ec979e18f17e8d9bbacbac954868 (diff) | |
| download | python-apt-ad7bc46acd80451de21ce58450edb0f4367a5c79.tar.gz | |
Fix code indentation to 4 spaces, to conform with PEP 8.
Diffstat (limited to 'doc/examples/inst.py')
| -rw-r--r-- | doc/examples/inst.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/doc/examples/inst.py b/doc/examples/inst.py index d1e2ff99..b37ab4cd 100644 --- a/doc/examples/inst.py +++ b/doc/examples/inst.py @@ -11,23 +11,23 @@ from apt.progress import InstallProgress class TextInstallProgress(InstallProgress): - def __init__(self): - apt.progress.InstallProgress.__init__(self) - self.last = 0.0 + def __init__(self): + apt.progress.InstallProgress.__init__(self) + self.last = 0.0 - def updateInterface(self): - InstallProgress.updateInterface(self) - if self.last >= self.percent: - return - sys.stdout.write("\r[%s] %s\n" %(self.percent, self.status)) - sys.stdout.flush() - self.last = self.percent + def updateInterface(self): + InstallProgress.updateInterface(self) + if self.last >= self.percent: + return + sys.stdout.write("\r[%s] %s\n" %(self.percent, self.status)) + sys.stdout.flush() + self.last = self.percent - def conffile(self,current,new): - print "conffile prompt: %s %s" % (current,new) + def conffile(self,current,new): + print "conffile prompt: %s %s" % (current,new) - def error(self, errorstr): - print "got dpkg error: '%s'" % errorstr + def error(self, errorstr): + print "got dpkg error: '%s'" % errorstr cache = apt.Cache(apt.progress.OpTextProgress()) @@ -39,11 +39,11 @@ pkg = cache["3dchess"] # install or remove, the importend thing is to keep us busy :) if pkg.isInstalled: - print "Going to delete %s" % pkg.name - pkg.markDelete() + print "Going to delete %s" % pkg.name + pkg.markDelete() else: - print "Going to install %s" % pkg.name - pkg.markInstall() + print "Going to install %s" % pkg.name + pkg.markInstall() res = cache.commit(fprogress, iprogress) print res |
