Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hostname containing Unicode characters makes pygenie/utils.py error out #18

Open
artwr opened this issue Nov 27, 2017 · 0 comments
Open

Comments

@artwr
Copy link
Contributor

artwr commented Nov 27, 2017

The "offending" line is https://github.com/Netflix/pygenie/blob/master/pygenie/utils.py#L34-L40

Even when importing unicode literals, it seems like socket.getfqdn() returns a str instead of a unicode, and the concatenation fails if the hostname contains a unicode character.

With newer Mac OSX, it seems the hostname is set with a unicode apostrophe by default e.g. "Arthur’s".

steps to reproduce on Mac OSX:

oldhost=$(scutil --get HostName)  # To save your current hostname
scutil --set HostName Arthur’s . # for instance
# Running anything importing pygenie under python 2
python2 -c "import pygenie"

It's more of an FYI, since there is an easy workaround (no unicode in the hostname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant