Treat xmlrpc error 504 differently
The error message for the error 504 reads: <Fault 504: 'The name XXX is not a valid username. Either you misspelled it, or the person has not registered for a ... Bugzilla ... account.'> In other words, the request succeeded but the user does not exist. So in those situation there are no reasons to keep on trying, it won't work at the next attempt either. Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
ad98b9e294
commit
87cbf38a29
1 changed files with 8 additions and 0 deletions
|
@ -453,6 +453,10 @@ class BugzillaProxy:
|
|||
self.server.editcomponent(data)
|
||||
break
|
||||
except Exception as e:
|
||||
if isinstance(e, xmlrpc.client.Fault) and e.faultCode == 504:
|
||||
if self.config['verbose']:
|
||||
print(f" ERROR {e}")
|
||||
raise
|
||||
if i >= num_attempts - 1:
|
||||
raise
|
||||
if self.config['verbose']:
|
||||
|
@ -523,6 +527,10 @@ class BugzillaProxy:
|
|||
self.server.addcomponent(data)
|
||||
break
|
||||
except Exception as e:
|
||||
if isinstance(e, xmlrpc.client.Fault) and e.faultCode == 504:
|
||||
if self.config['verbose']:
|
||||
print(f" ERROR {e}")
|
||||
raise
|
||||
if i >= num_attempts - 1:
|
||||
raise
|
||||
if self.config['verbose']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue