Test if we have _SOCK before use it for issue273

This commit is contained in:
Cédric Krier committed 2008-08-23 12:09:09 +02:00
1 parent 6e56d3f04c
commit d656ad14a6
1 file changed
+4
+4
View File
@@ -609,6 +609,10 @@ def concurrency(resource, obj_id, context, parent):
def process_exception(exception, parent, obj='', method='', *args):
global _USERNAME, _DATABASE, _SOCK
if str(exception.args[0]) == 'NotLogged':
if not rpc._SOCK:
message(_('Connection error!\n' \
'Unable to connect to the server!'), parent)
return False
host = rpc._SOCK.host
port = rpc._SOCK.port
while True: