Skip to content

Conversation

@whiteroses
Copy link
Contributor

@whiteroses whiteroses commented Oct 12, 2020

This fixes issue #123, which was due to a misinterpretation of the
line

if host.split(".")[0][0].isalpha() or host.split(".")[-1][-1].isalpha():

(see L156 of input.py after commit 8d46d14/before commit d1c90a4). Because of
how Python's str.split() works, a hostname that does not contain a
period when .split(".") results in a single-item list, so this
expression evaluates to True. However, this also means that the
.split()s had no effect: the line was equivalent to

if host[0].isalpha() or host[-1].isalpha().

This fixes issue codingo#123, which was due to a misinterpretation of the
line

`if host.split(".")[0][0].isalpha() or host.split(".")[-1][-1].isalpha():`

(see commit 8d46d14, L156). Because of
how Python's str.split() works, a hostname that does not contain a
period when .split(".") results in a single-item list, so this
expression evaluates to True. However, this also means that the
.split()s had no effect: the line was equivalent to

`if host[0].isalpha() or host[-1].isalpha()`.
@prodigysml prodigysml merged commit 7d715f6 into codingo:master Oct 26, 2020
@prodigysml
Copy link
Collaborator

Sorry for taking so long! This was a very necessary bug fix! You're a legend mate @whiteroses!

@whiteroses
Copy link
Contributor Author

@prodigysml Sorry again for the bug, and thanks for merge and maintenance!

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

Successfully merging this pull request may close these issues.

2 participants