From 8317eab937315f9cd7e5b4d979196224012fe26a Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 6 Mar 2014 19:10:56 -0500 Subject: [PATCH] Fixes a bug that prevents round-tripping of * and @ --- cloud/route53 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cloud/route53 b/cloud/route53 index 2ff22ded9dc..f98f68f4bd9 100644 --- a/cloud/route53 +++ b/cloud/route53 @@ -220,11 +220,16 @@ def main(): found_record = False sets = conn.get_all_rrsets(zones[zone_in]) for rset in sets: - if rset.type == type_in and rset.name == record_in: + # Due to a bug in either AWS or Boto, "special" characters are returned as octals, preventing round + # tripping of things like * and @. + decoded_name = rset.name.replace(r'\052', '*') + decoded_name = rset.name.replace(r'\100', '@') + + if rset.type == type_in and decoded_name == record_in: found_record = True record['zone'] = zone_in record['type'] = rset.type - record['record'] = rset.name + record['record'] = decoded_name record['ttl'] = rset.ttl record['value'] = ','.join(sorted(rset.resource_records)) record['values'] = sorted(rset.resource_records)