@@ -142,7 +142,7 @@ def request(self, query, request_time_limit=0):
142
142
try :
143
143
self .rabbitmq_connection .process_data_events (time_limit = request_time_limit )
144
144
except Exception as e :
145
- logger .exception ('Error from RabbitMQ.process_data_events' )
145
+ logger .exception ('Error from RabbitMQ.process_data_events: %r' , e )
146
146
self .reply = '{"error": "EPP request processing failed: %s"}' % e
147
147
if not self .reply and request_time_limit :
148
148
self .reply = '{"error": "EPP request timeout"}'
@@ -233,7 +233,7 @@ def do_rpc_request(json_request, cache_client=True, health_marker_filepath=None,
233
233
logger .error ('empty response from EPP_RPC_Client' )
234
234
raise ValueError ('empty response from EPP_RPC_Client' )
235
235
except Exception as exc :
236
- logger .exception ('ERROR from EPP_RPC_Client: %r' % exc )
236
+ logger .exception ('ERROR from EPP_RPC_Client: %r' , exc )
237
237
health_marker_filepath = os .environ .get ('RPC_CLIENT_HEALTH_FILE' , health_marker_filepath )
238
238
if not health_marker_filepath :
239
239
# if there is no configuration for the health marker file - do not do any retries and just fail
@@ -244,15 +244,19 @@ def do_rpc_request(json_request, cache_client=True, health_marker_filepath=None,
244
244
time .sleep (2 )
245
245
# if the issue is still here it will raise EPPBadResponse() in run() method anyway
246
246
_CachedClient = None
247
- client = make_client (
248
- cache_client = cache_client ,
249
- rabbitmq_credentials = rabbitmq_credentials ,
250
- rabbitmq_connection_timeout = rabbitmq_connection_timeout ,
251
- rabbitmq_queue_name = rabbitmq_queue_name ,
252
- json_conf = json_conf ,
253
- )
254
- client .connect ()
255
- reply = client .request (json .dumps (json_request ), request_time_limit = request_time_limit )
247
+ try :
248
+ client = make_client (
249
+ cache_client = cache_client ,
250
+ rabbitmq_credentials = rabbitmq_credentials ,
251
+ rabbitmq_connection_timeout = rabbitmq_connection_timeout ,
252
+ rabbitmq_queue_name = rabbitmq_queue_name ,
253
+ json_conf = json_conf ,
254
+ )
255
+ client .connect ()
256
+ reply = client .request (json .dumps (json_request ), request_time_limit = request_time_limit )
257
+ except Exception as exc :
258
+ logger .exception ('ERROR from EPP_RPC_Client after retry: %r' , exc )
259
+ return None
256
260
return reply
257
261
258
262
#------------------------------------------------------------------------------
@@ -433,8 +437,6 @@ def cmd_contact_create(contact_id, email=None, voice=None, fax=None, auth_info=N
433
437
cmd ['args' ]['email' ] = email
434
438
if auth_info is not None :
435
439
cmd ['args' ]['auth_info' ] = auth_info
436
- if not include_international and not include_local :
437
- include_international = True
438
440
if include_international :
439
441
for cont in contacts_list [:]:
440
442
international = copy .deepcopy (cont )
@@ -502,8 +504,6 @@ def cmd_contact_update(contact_id, email=None, voice=None, fax=None, auth_info=N
502
504
cmd ['args' ]['email' ] = email
503
505
if auth_info is not None :
504
506
cmd ['args' ]['auth_info' ] = auth_info
505
- if not include_international and not include_local :
506
- include_international = True
507
507
if include_international :
508
508
for cont in contacts_list [:]:
509
509
international = copy .deepcopy (cont )
0 commit comments