Fix some 'DeprecationWarning: invalid escape sequence' warnings and use str.format for string interpolation.
I am seeing a lot of deperecation warnings when I use moto for my tests (running under pytest), so I figured I'll clean up some of them.
This commit is contained in:
parent
c54e2ec001
commit
374b623e1d
6 changed files with 20 additions and 18 deletions
|
|
@ -403,7 +403,7 @@ class ECRBackend(BaseBackend):
|
|||
|
||||
# If we have a digest, is it valid?
|
||||
if "imageDigest" in image_id:
|
||||
pattern = re.compile("^[0-9a-zA-Z_+\.-]+:[0-9a-fA-F]{64}")
|
||||
pattern = re.compile(r"^[0-9a-zA-Z_+\.-]+:[0-9a-fA-F]{64}")
|
||||
if not pattern.match(image_id.get("imageDigest")):
|
||||
response["failures"].append(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue