~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to quodlibet/util/uri.py

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-07-27 14:02:54 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20090727140254-zxutnf2kkhtpubnp
Tags: 2.1-2ubuntu1
* Resync from debian unstable (LP: #401965)
* debian/patches:
  - fix-context-crashes.patch: Dropped. Included Upstream.
  - 60-popen2-deprecated.patch: Dropped. Included Upstream.
* debian/quodlibet-ext.install: Changed 'site-packages' to '*-packages'.
* debian/rules: Changed 'site-packages' to '*-packages'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# it under the terms of the GNU General Public License version 2 as
5
5
# published by the Free Software Foundation
6
6
#
7
 
# $Id: uri.py 4330 2008-09-14 03:19:26Z piman $
 
7
# $Id: uri.py 6919aa22828d 2009/06/22 04:53:02 $
8
8
 
9
9
# TODO:
10
10
#  * netloc separation (user/passwd/host/port using urllib)
46
46
            values[2] = quote_plus(values[2], safe="/~")
47
47
        value = urlunparse(values)
48
48
        obj = str.__new__(klass, value)
49
 
        if not obj.scheme: raise ValueError("URIs must have a scheme")
 
49
        if not obj.scheme:
 
50
            raise ValueError("URIs must have a scheme, such as 'http://'")
50
51
        elif not (obj.netloc or obj.path):
51
52
            raise ValueError("URIs must have a network location or path")
52
53
        else: return obj