[rhinstaller/anaconda/pulls/98 master] Fix bad IP checker in text installation

kellinm installerbot-noreply at redhat.com
Fri May 8 19:13:17 UTC 2015


The class name *Fake_RE_Nameservers* doesn't really describe what's happening.  It looks like it's a boolean method that checks the IP address and returns whether or not is is valid.  Is_Valid_IP_By_Regex would be easier to parse for future maintainers.

There is also similar ticket out there for nameservers entry failing when the entry is "X.X.X.X, Y.Y.Y.Y" due to the extra space as an invalid character. I was looking to actually use the validated IP to check and catch exceptions and return those to the logs and remove the entry from the list to prevent crashes.  The failed entries would also show up on the screen with an abbreviated message to the user.

I like your concept of the wrapper class - what if we combined both solutions and had that code inside your wrapper using both the regular expression as well as an actual network validation that returns BOOLEAN, ErrorMessage and we can display the errors in the text client?
-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/98


More information about the anaconda-patches mailing list