r352 - branches/rewrite/src
Sergio Talens-Oliag
partial-mirror-devel@lists.alioth.debian.org
Fri, 19 Nov 2004 05:15:43 -0700
Author: sto
Date: Fri Nov 19 05:15:42 2004
New Revision: 352
Modified:
branches/rewrite/src/Pool.py
branches/rewrite/src/debpartial-mirror.in
Log:
Small typos on Pool.py found when starting to add docstrings to the main
program.
Modified: branches/rewrite/src/Pool.py
==============================================================================
--- branches/rewrite/src/Pool.py (original)
+++ branches/rewrite/src/Pool.py Fri Nov 19 05:15:42 2004
@@ -95,7 +95,7 @@
"""
Download the Package p in
"""
- f = p.['Filename']
+ f = p['Filename']
Download (self._server + f,
self.local + f)
@@ -112,7 +112,7 @@
Link the Package p in the pool
"""
- f = p.['Filename']
+ f = p['Filename']
os.link (self._server + f,
self._local + f)
Modified: branches/rewrite/src/debpartial-mirror.in
==============================================================================
--- branches/rewrite/src/debpartial-mirror.in (original)
+++ branches/rewrite/src/debpartial-mirror.in Fri Nov 19 05:15:42 2004
@@ -1,4 +1,7 @@
#!/usr/bin/env python
+"""
+Tool to build partial debian mirrors (and more)
+"""
# debpartial-mirror - partial debian mirror package tool
# (c) 2004 Otavio Salvador <otavio@debian.org>
@@ -46,12 +49,15 @@
# ---------
# Functions
# ---------
+
def version():
+ """Print package version"""
print """debpartial-mirror @VERSION@ - Partial mirroring tool for Debian - @DATE@
This program is free software and was released under the terms of the GNU General Public License
"""
def usage(ret=2):
+ """Print program usage message"""
global conffile
global cmnds_desc
global cmnds_list
@@ -71,10 +77,10 @@
%s
And MIRROR selects which mirror we should work with (all by default).
""" % (conffile, cmnds_string)
-
exit(ret)
def main():
+ """Main program"""
global conffile
global cmnds_list
@@ -133,9 +139,7 @@
# Get available backends
backends = []
for b in cnf.getBackends():
- if sect != "":
- backends.append(Backend(b.section, cnf))
- elif b.section == sect:
+ if sect != "" or b.section == sect:
backends.append(Backend(b.section, cnf))
for b in backends: