From e6c9ef72803299f3ca47f788d7ecf255fa35e55a Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 5 Feb 2011 13:21:50 +0000 Subject: [PATCH] Removed the long-deprecated AutoPolicy class --- zeroinstall/__init__.py | 4 ++-- zeroinstall/injector/autopolicy.py | 28 ---------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 zeroinstall/injector/autopolicy.py diff --git a/zeroinstall/__init__.py b/zeroinstall/__init__.py index b26a71b..7df786f 100644 --- a/zeroinstall/__init__.py +++ b/zeroinstall/__init__.py @@ -32,7 +32,7 @@ class SafeException(Exception): The command-line interface's C{--verbose} option will display the full stack trace.""" class NeedDownload(SafeException): - """Thrown by L{injector.autopolicy.AutoPolicy} if we tried to start a download - and downloading is disabled.""" + """Thrown if we tried to start a download and downloading is + disabled.""" def __init__(self, url): Exception.__init__(self, _("Would download '%s'") % url) diff --git a/zeroinstall/injector/autopolicy.py b/zeroinstall/injector/autopolicy.py deleted file mode 100644 index be4f341..0000000 --- a/zeroinstall/injector/autopolicy.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -A simple non-interactive policy. - -This module provides a simple policy that will select, download and run a suitable set of -implementations. It is not interactive. This is the policy used when you run B{0launch -c}, and -is also the policy used to run the injector's GUI. - -@deprecated: The interesting functionality has moved into the L{policy.Policy} base-class. -""" - -# Copyright (C) 2009, Thomas Leonard -# See the README file for details, or visit http://0install.net. - -from zeroinstall import _ -from logging import info - -from zeroinstall.injector import policy -from zeroinstall.injector.handler import Handler - -class AutoPolicy(policy.Policy): - def __init__(self, interface_uri, download_only = False, dry_run = False, src = False, handler = None, command = 'run'): - """@param handler: (new in 0.30) handler to use, or None to create a L{Handler}""" - assert download_only is False - handler = handler or Handler() - if dry_run: - info(_("Note: dry_run is deprecated. Pass it to the handler instead!")) - handler.dry_run = True - policy.Policy.__init__(self, interface_uri, handler, src = src, command = command) -- 2.11.4.GIT