mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-12 23:56:13 +01:00
python3 compatibility: raise
support for old style exceptions has been removed from python3
This commit is contained in:
parent
7f2031558c
commit
b534ae0a6a
@ -2955,7 +2955,7 @@ def check_store_version(dir):
|
||||
msg = 'The osc metadata of your working copy "%s"' % dir
|
||||
msg += '\nhas __store_version__ = %s, but it should be %s' % (v, __store_version__)
|
||||
msg += '\nPlease do a fresh checkout or update your client. Sorry about the inconvenience.'
|
||||
raise oscerr.WorkingCopyWrongVersion, msg
|
||||
raise oscerr.WorkingCopyWrongVersion(msg)
|
||||
|
||||
|
||||
def meta_get_packagelist(apiurl, prj, deleted=None):
|
||||
|
@ -277,7 +277,7 @@ class myProxyHTTPSConnection(M2Crypto.httpslib.ProxyHTTPSConnection, HTTPSConnec
|
||||
#real host/port to be used to make CONNECT request to proxy
|
||||
proto, rest = urllib.splittype(url)
|
||||
if proto is None:
|
||||
raise ValueError, "unknown URL type: %s" % url
|
||||
raise ValueError("unknown URL type: %s" % url)
|
||||
#get host
|
||||
host, rest = urllib.splithost(rest)
|
||||
#try to get port
|
||||
@ -287,7 +287,7 @@ class myProxyHTTPSConnection(M2Crypto.httpslib.ProxyHTTPSConnection, HTTPSConnec
|
||||
try:
|
||||
port = self._ports[proto]
|
||||
except KeyError:
|
||||
raise ValueError, "unknown protocol for: %s" % url
|
||||
raise ValueError("unknown protocol for: %s" % url)
|
||||
self._real_host = host
|
||||
self._real_port = int(port)
|
||||
M2Crypto.httpslib.HTTPSConnection.putrequest(self, method, url, skip_host, skip_accept_encoding)
|
||||
|
Loading…
Reference in New Issue
Block a user