From: Cameron Dale Date: Sat, 26 Apr 2008 01:50:42 +0000 (-0700) Subject: Fix some documentation errors. X-Git-Url: https://git.mxchange.org/?p=quix0rs-apt-p2p.git;a=commitdiff_plain;h=872f3e24afa2a8a23956d1c191520a7f699ac8c6;ds=sidebyside Fix some documentation errors. --- diff --git a/apt-p2p.py b/apt-p2p.py index 277cd76..911dfce 100644 --- a/apt-p2p.py +++ b/apt-p2p.py @@ -1,13 +1,14 @@ -#!/usr/bin/env python +#!/usr/bin/python -# Load apt-p2p application -# -# There are two ways apt-p2p can be started: -# 1. twistd -y apt-p2p -# - twistd will load this file and execute the app -# in 'application' variable -# 2. from command line -# - __name__ will be '__main__' +"""Load the apt-p2p application. + +There are two ways apt-p2p can be started: + 1. twistd -y apt-p2p + - twistd will load this file and execute the app + in 'application' variable + 2. from command line + - __name__ will be '__main__' +""" import pwd,sys diff --git a/apt_p2p/HTTPServer.py b/apt_p2p/HTTPServer.py index 652198f..c92df92 100644 --- a/apt_p2p/HTTPServer.py +++ b/apt_p2p/HTTPServer.py @@ -90,7 +90,7 @@ class FileDownloader(static.File): class PiecesUploader(static.Data): """Modified to identify it for peer requests. - Uses the modified L{Streams.PieceUploadStream} to stream the pieces for throttling. + Uses the modified L{Streams.PiecesUploadStream} to stream the pieces for throttling. """ def render(self, req): diff --git a/apt_p2p/apt_p2p.py b/apt_p2p/apt_p2p.py index c7e6d67..385e275 100644 --- a/apt_p2p/apt_p2p.py +++ b/apt_p2p/apt_p2p.py @@ -179,8 +179,6 @@ class AptP2P(protocol.Factory): @param url: the URI of the actual mirror request @type orig_resp: L{twisted.web2.http.Response} @param orig_resp: the response from the cache to be sent to apt - @rtype: L{twisted.internet.defer.Deferred} - @return: a deferred that will be called back with the correct response """ log.msg('Checking if %s is still fresh' % url) modtime = orig_resp.headers.getHeader('Last-Modified') diff --git a/apt_p2p/stats.py b/apt_p2p/stats.py index bd422d9..7cea6b2 100644 --- a/apt_p2p/stats.py +++ b/apt_p2p/stats.py @@ -34,8 +34,8 @@ class StatsLogger: def __init__(self, db): """Initialize the statistics. - @type store: L{db.DB} - @param store: the database for the Apt-P2P downloader + @type db: L{db.DB} + @param db: the database for the Apt-P2P downloader """ # Database self.db = db diff --git a/docs/epydoc.config b/docs/epydoc.config index 593c5ab..43a74f1 100644 --- a/docs/epydoc.config +++ b/docs/epydoc.config @@ -3,7 +3,7 @@ # The list of objects to document. Objects can be named using # dotted names, module filenames, or package directory names. # Alases for this option include "objects" and "values". -modules: apt_p2p apt_p2p_Khashmir test.py +modules: apt_p2p apt_p2p_Khashmir apt-p2p.py test.py # The type of output that should be generated. Should be one # of: html, text, latex, dvi, ps, pdf. diff --git a/test.py b/test.py index 1986701..83c2d1b 100755 --- a/test.py +++ b/test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python """Automated tests of the apt-p2p functionality. @@ -29,7 +29,8 @@ the apt-p2p program. @var CWD: the working directory the script was run from @type apt_conf_template: C{string} @var apt_conf_template: the template to use for the apt.conf file - +@type apt_p2p_conf_template: C{string} +@var apt_p2p_conf_template: the template to use for the apt-p2p.conf file """ from time import sleep, time