Forgot that lstrip works on character sets, not substrings
I suppose this is one way to do it. I could have also split and taken
the last element. Not sure which is best. 🤔
This commit is contained in:
parent
6346e44c9d
commit
f2b7ba03b4
@ -277,7 +277,7 @@ class Route53Backend(BaseBackend):
|
||||
return self.zones.values()
|
||||
|
||||
def get_hosted_zone(self, id_):
|
||||
return self.zones.get(id_.lstrip("/hostedzone/"))
|
||||
return self.zones.get(id_.replace("/hostedzone/", ""))
|
||||
|
||||
def get_hosted_zone_by_name(self, name):
|
||||
for zone in self.get_all_hosted_zones():
|
||||
@ -285,7 +285,7 @@ class Route53Backend(BaseBackend):
|
||||
return zone
|
||||
|
||||
def delete_hosted_zone(self, id_):
|
||||
return self.zones.pop(id_.lstrip("/hostedzone/"), None)
|
||||
return self.zones.pop(id_.replace("/hostedzone/", ""), None)
|
||||
|
||||
def create_health_check(self, health_check_args):
|
||||
health_check_id = str(uuid.uuid4())
|
||||
|
Loading…
Reference in New Issue
Block a user