clicrdv: catch a more precise exception, and add an explanation
This commit is contained in:
parent
aa18beb55c
commit
092eda8407
|
@ -345,7 +345,10 @@ class ClicRdvCancelAppointment(WorkflowStatusItem):
|
|||
req.get_method = (lambda: 'DELETE')
|
||||
fd = urllib2.urlopen(req)
|
||||
none = fd.read()
|
||||
except: # no idea what's the error that would be raised :/
|
||||
except urllib2.URLError:
|
||||
# clicrdv will return a "Bad Request" (HTTP 400) response
|
||||
# when it's not possible to remove an appointment
|
||||
# (for example because it's too late)
|
||||
success = False
|
||||
|
||||
if (success and self.status_on_success) or (success is False and self.status_on_failure):
|
||||
|
|
Reference in New Issue