Fix some 'DeprecationWarning: invalid escape sequence' warnings and use str.format for string interpolation.
Similar to https://github.com/spulec/moto/pull/2811
This commit is contained in:
parent
ef704852dd
commit
2e20ad14df
4 changed files with 18 additions and 13 deletions
|
|
@ -305,12 +305,12 @@ class EventsBackend(BaseBackend):
|
|||
|
||||
if principal is None or self.ACCOUNT_ID.match(principal) is None:
|
||||
raise JsonRESTError(
|
||||
"InvalidParameterValue", "Principal must match ^(\d{1,12}|\*)$"
|
||||
"InvalidParameterValue", r"Principal must match ^(\d{1,12}|\*)$"
|
||||
)
|
||||
|
||||
if statement_id is None or self.STATEMENT_ID.match(statement_id) is None:
|
||||
raise JsonRESTError(
|
||||
"InvalidParameterValue", "StatementId must match ^[a-zA-Z0-9-_]{1,64}$"
|
||||
"InvalidParameterValue", r"StatementId must match ^[a-zA-Z0-9-_]{1,64}$"
|
||||
)
|
||||
|
||||
event_bus._permissions[statement_id] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue