diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-02 07:50:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-02 07:50:54 +0000 |
commit | 2ea11722ca25a22659685e4b8020a9c52b933b6a (patch) | |
tree | 4f1f7c91cea611f01ba396ead5dd200e8915a587 /pym/portage/getbinpkg.py | |
parent | a11eefe66802e21b8f042d0a50de9d4b24ffa57f (diff) | |
download | portage-2ea11722ca25a22659685e4b8020a9c52b933b6a.tar.gz portage-2ea11722ca25a22659685e4b8020a9c52b933b6a.tar.bz2 portage-2ea11722ca25a22659685e4b8020a9c52b933b6a.zip |
Py3k compatibility patch by Ali Polatel <hawking@g.o>.
Don't use the format raise Exception, "string"
svn path=/main/trunk/; revision=10890
Diffstat (limited to 'pym/portage/getbinpkg.py')
-rw-r--r-- | pym/portage/getbinpkg.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 412d753df..da0dd77ad 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -82,7 +82,8 @@ def create_conn(baseurl,conn=None): parts = baseurl.split("://",1) if len(parts) != 2: - raise ValueError, "Provided URL does not contain protocol identifier. '%s'" % baseurl + raise ValueError("Provided URL does not " + \ + "contain protocol identifier. '%s'" % baseurl) protocol,url_parts = parts del parts @@ -104,7 +105,7 @@ def create_conn(baseurl,conn=None): del userpass_host if len(userpass) > 2: - raise ValueError, "Unable to interpret username/password provided." + raise ValueError("Unable to interpret username/password provided.") elif len(userpass) == 2: username = userpass[0] password = userpass[1] @@ -323,7 +324,7 @@ def dir_get_list(baseurl,conn=None): elif protocol == "sftp": listing = conn.listdir(address) else: - raise TypeError, "Unknown protocol. '%s'" % protocol + raise TypeError("Unknown protocol. '%s'" % protocol) if not keepconnection: conn.close() @@ -355,7 +356,7 @@ def file_get_metadata(baseurl,conn=None, chunk_size=3000): finally: f.close() else: - raise TypeError, "Unknown protocol. '%s'" % protocol + raise TypeError("Unknown protocol. '%s'" % protocol) if data: xpaksize = portage.xpak.decodeint(data[-8:-4]) @@ -447,7 +448,7 @@ def file_get_lib(baseurl,dest,conn=None): finally: f.close() else: - raise TypeError, "Unknown protocol. '%s'" % protocol + raise TypeError("Unknown protocol. '%s'" % protocol) if not keepconnection: conn.close() |