fixing unimported exceptions
This commit is contained in:
parent
5f39a832b3
commit
7b954b8cd5
1 changed files with 4 additions and 3 deletions
|
|
@ -4,6 +4,7 @@
|
|||
# Authors:
|
||||
# Mike Bonnet <mikeb@redhat.com>
|
||||
|
||||
from koji import PluginError
|
||||
from koji.plugin import callbacks, callback, ignore_error
|
||||
import ConfigParser
|
||||
import logging
|
||||
|
|
@ -29,7 +30,7 @@ def connect_timeout(host, port, timeout):
|
|||
try:
|
||||
sock.connect(sa)
|
||||
break
|
||||
except socket.error, msg:
|
||||
except socket.error:
|
||||
sock.close()
|
||||
else:
|
||||
# If we got here then we couldn't connect (yet)
|
||||
|
|
@ -101,7 +102,7 @@ def get_sender():
|
|||
keytab = krbV.Keytab(name='FILE:' + config.get('broker', 'keytab'), context=ctx)
|
||||
ccache.init_creds_keytab(principal=cprinc, keytab=keytab)
|
||||
else:
|
||||
raise koji.PluginError, 'unsupported auth type: %s' % auth
|
||||
raise PluginError, 'unsupported auth type: %s' % auth
|
||||
|
||||
url += config.get('broker', 'host') + ':'
|
||||
url += config.get('broker', 'port')
|
||||
|
|
@ -221,7 +222,7 @@ def send_message(cbtype, *args, **kws):
|
|||
headers = get_message_headers(msgtype, *args, **kws)
|
||||
message = qpid.messaging.Message(properties=headers, content=data)
|
||||
else:
|
||||
raise koji.PluginError, 'unsupported exchange type: %s' % exchange_type
|
||||
raise PluginError, 'unsupported exchange type: %s' % exchange_type
|
||||
|
||||
sender.send(message, sync=True, timeout=config.getfloat('broker', 'timeout'))
|
||||
sender.close(timeout=config.getfloat('broker', 'timeout'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue