~jtaylor/ubuntu/maverick/tahoe-lafs/fix-848476

« back to all changes in this revision

Viewing changes to src/allmydata/scripts/tahoe_webopen.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Visser, Jeremy Visser, Fabrice Coutadeur
  • Date: 2010-03-04 19:37:54 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100304193754-2xjgls4n6nul3wz0
Tags: 1.6.1-0ubuntu1
[Jeremy Visser]
* Update to bugfix release 1.6.1 (LP: #529350).
  - Correct handling of small immutable directories.
  - Improved user interface messages and error reporting.
* debian/control: bump standards-version to 3.8.4. No changes required.
* debian/gbp.conf: deleted as it's a temporary file left over
* debian/watch: fixed to have the correct tarball name and avoid SUMO version

[Fabrice Coutadeur]
* Switch to dpkg-source 3.0 (quilt) format
* debian/reduce_build_dependencies.patch: converted from direct source
  changes done in 1.6.0 to reduce the required dependencies and not download
  them at build time.
* debian/rules: deleted get-orig-source target as the watch file has been
  fixed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path
 
2
from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path, \
 
3
                                     UnknownAliasError
3
4
import urllib
4
5
 
5
6
def webopen(options, opener=None):
6
7
    nodeurl = options['node-url']
 
8
    stderr = options.stderr
7
9
    if not nodeurl.endswith("/"):
8
10
        nodeurl += "/"
9
11
    where = options.where
10
12
    if where:
11
 
        rootcap, path = get_alias(options.aliases, where, DEFAULT_ALIAS)
 
13
        try:
 
14
            rootcap, path = get_alias(options.aliases, where, DEFAULT_ALIAS)
 
15
        except UnknownAliasError, e:
 
16
            print >>stderr, "error: %s" % e.args[0]
 
17
            return 1
12
18
        if path == '/':
13
19
            path = ''
14
20
        url = nodeurl + "uri/%s" % urllib.quote(rootcap)