~ubuntu-branches/ubuntu/karmic/zeroinstall-injector/karmic

« back to all changes in this revision

Viewing changes to zeroinstall/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Leonard
  • Date: 2007-01-23 21:50:46 UTC
  • Revision ID: james.westby@ubuntu.com-20070123215046-3ya2x81i99m5ya8r
Tags: upstream-0.25
ImportĀ upstreamĀ versionĀ 0.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
The Python implementation of the Zero Install injector is divided into three packages:
 
3
 
 
4
 - zeroinstall (this package) just defines a couple of exceptions and the version number.
 
5
 - L{zeroinstall.injector} contains most of the interesting stuff.
 
6
 - L{zeroinstall.zerostore} contains low-level code for handling the
 
7
   implementation cache.
 
8
 
 
9
@copyright: (C) 2007, Thomas Leonard
 
10
@see: U{http://0install.net}
 
11
"""
 
12
 
 
13
version = '0.25'
 
14
 
 
15
class SafeException(Exception):
 
16
        """An exception that can be reported to the user without a stack trace.
 
17
        The command-line interface's C{--verbose} option will display the full stack trace."""
 
18
 
 
19
class NeedDownload(SafeException):
 
20
        """Thrown by L{injector.autopolicy.AutoPolicy} if we tried to start a download
 
21
        and downloading is disabled."""
 
22
        def __init__(self, url):
 
23
                Exception.__init__(self, "Would download '%s'" % url)