unicode domain names ʙᴜɢꜱ.com xn--1na3i716f6h0k.com
Closed this issue · 2 comments
h4ck3rm1k3 commented
For ʙᴜɢꜱ.com xn--1na3i716f6h0k.com
File "/home/mdupont/experiments/rs/godaddypy/godaddypy/client.py", line 176, in get_domain
url = self.API_TEMPLATE + self.DOMAIN_INFO.format(domain=domain)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
patch :
modified godaddypy/client.py
@@ -26,12 +26,12 @@ class Client(object):
self.logger.setLevel(log_level)
# Templates
- self.API_TEMPLATE = 'https://api.godaddy.com/v1'
- self.DOMAINS = '/domains'
- self.DOMAIN_INFO = '/domains/{domain}'
- self.RECORDS = '/domains/{domain}/records'
- self.RECORDS_TYPE = '/domains/{domain}/records/{type}'
- self.RECORDS_TYPE_NAME = '/domains/{domain}/records/{type}/{name}'
+ self.API_TEMPLATE = u'https://api.godaddy.com/v1'
+ self.DOMAINS = u'/domains'
+ self.DOMAIN_INFO = u'/domains/{domain}'
+ self.RECORDS = u'/domains/{domain}/records'
+ self.RECORDS_TYPE = u'/domains/{domain}/records/{type}'
+ self.RECORDS_TYPE_NAME = u'/domains/{domain}/records/{type}/{name}'
self.account = account
eXamadeus-zz commented
Thanks for the fix. Suppose I should have thought of unicode strings a long time ago.
If you find anything else, just submit a pull request and that will be a lot easier for me to merge in.
Added fix and pushed to version 2.2.4
h4ck3rm1k3 commented
𝕿𝖍𝖆𝖓𝖐𝖘
…On Mon, Jun 12, 2017 at 9:36 AM, Julian Coy ***@***.***> wrote:
Closed #24 <eXamadeus/godaddypy#24>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<eXamadeus/godaddypy#24 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACIV7dJxZtQTIY2EjtluDKRuujirEmHks5sDT7BgaJpZM4N2WfN>
.
--
James Michael DuPont