From a59ac793100b58f29751e1f2e4b931cfbd00bbfa Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 30 Jul 2008 19:04:01 +0100 Subject: [PATCH] Fixed some epydoc comments. --- zeroinstall/gtkui/desktop.py | 2 +- zeroinstall/gtkui/treetips.py | 2 +- zeroinstall/injector/handler.py | 6 +++--- zeroinstall/injector/iface_cache.py | 6 +++--- zeroinstall/injector/policy.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zeroinstall/gtkui/desktop.py b/zeroinstall/gtkui/desktop.py index 90ed80a..34e287e 100644 --- a/zeroinstall/gtkui/desktop.py +++ b/zeroinstall/gtkui/desktop.py @@ -9,7 +9,7 @@ import logging def main(command_args): """Implements the logic of the 0desktop command. - @param args: the command-line arguments""" + @param command_args: the command-line arguments""" parser = OptionParser(usage="usage: %prog [options] [URI]") parser.add_option("-m", "--manage", help="manage added applications", action='store_true') parser.add_option("-v", "--verbose", help="more verbose output", action='count') diff --git a/zeroinstall/gtkui/treetips.py b/zeroinstall/gtkui/treetips.py index 85f4012..56fd16c 100644 --- a/zeroinstall/gtkui/treetips.py +++ b/zeroinstall/gtkui/treetips.py @@ -70,7 +70,7 @@ class TreeTips: def prime(self, parent, item): """Call this whenever the pointer moves to an area with a different tooltip. - @param param: the TreeView widget + @param parent: the TreeView widget @param item: the text to display @see L{get_tooltip_text}""" self.hide() diff --git a/zeroinstall/injector/handler.py b/zeroinstall/injector/handler.py index c6a4180..18b9cee 100644 --- a/zeroinstall/injector/handler.py +++ b/zeroinstall/injector/handler.py @@ -13,12 +13,12 @@ To do this, you supply a L{Handler} to the L{policy}. import os, sys from logging import debug, info, warn -from zeroinstall import NeedDownload +from zeroinstall import NeedDownload, SafeException from zeroinstall.support import tasks from zeroinstall.injector import model, download from zeroinstall.injector.iface_cache import iface_cache -class NoTrustedKeys(model.SafeException): +class NoTrustedKeys(SafeException): """Thrown by L{Handler.confirm_trust_keys} on failure.""" pass @@ -133,7 +133,7 @@ class Handler(object): assert sigs valid_sigs = [s for s in sigs if isinstance(s, gpg.ValidSig)] if not valid_sigs: - raise model.SafeException('No valid signatures found. Signatures:' + + raise SafeException('No valid signatures found. Signatures:' + ''.join(['\n- ' + str(s) for s in sigs])) domain = trust.domain_from_url(interface.uri) diff --git a/zeroinstall/injector/iface_cache.py b/zeroinstall/injector/iface_cache.py index c842c43..abf8c9b 100644 --- a/zeroinstall/injector/iface_cache.py +++ b/zeroinstall/injector/iface_cache.py @@ -35,7 +35,7 @@ from zeroinstall.support import basedir from zeroinstall.injector import reader, model from zeroinstall.injector.namespaces import * from zeroinstall.injector.model import * -from zeroinstall import zerostore +from zeroinstall import zerostore, SafeException def _pretty_time(t): assert isinstance(t, (int, long)), t @@ -214,7 +214,7 @@ class IfaceCache(object): @param modified_time: the timestamp of the oldest trusted signature (used as an approximation to the interface's modification time) @type modified_time: long - @raises SafeException: if modified_time is older than the currently cached time + @raises ReplayAttack: if modified_time is older than the currently cached time """ debug("Updating '%s' from network; modified at %s" % (interface.name or interface.uri, _pretty_time(modified_time))) @@ -245,7 +245,7 @@ class IfaceCache(object): @param interface: updated once the new XML is written @param new_xml: the data to write @param modified_time: when new_xml was modified - @raises SafeException: if the new mtime is older than the current one + @raises ReplayAttack: if the new mtime is older than the current one """ assert modified_time diff --git a/zeroinstall/injector/policy.py b/zeroinstall/injector/policy.py index e91f937..af6d326 100644 --- a/zeroinstall/injector/policy.py +++ b/zeroinstall/injector/policy.py @@ -271,7 +271,7 @@ class Policy(object): def get_uncached_implementations(self): """List all chosen implementations which aren't yet available locally. - @rtype: [(str, model.Implementation)]""" + @rtype: [(L{model.Interface}, L{model.Implementation})]""" uncached = [] for iface in self.solver.selections: impl = self.solver.selections[iface] -- 2.11.4.GIT