Split long code lines.
authorSteven Black <redacted>
Mon, 8 Feb 2016 00:34:27 +0000 (19:34 -0500)
committerSteven Black <redacted>
Mon, 8 Feb 2016 00:34:27 +0000 (19:34 -0500)
updateHostsFile.py

index 0013b63e0ad55d97d919f45b5104fd49954fd6ff..c2e10243425325d989309e7a5dd20020393172a5 100644 (file)
@@ -315,7 +315,8 @@ def updateReadme(numberOfRules):
 
 def moveHostsFileIntoPlace(finalFile):
     if os.name == 'posix':
-        print ('Moving the file requires administrative privileges. You might need to enter your password.')
+        print ('Moving the file requires administrative privileges. ' +
+               'You might need to enter your password.')
         if subprocess.call(["/usr/bin/sudo", "cp", os.path.abspath(finalFile.name), "/etc/hosts"]):
             printFailure("Moving the file failed.")
         print ('Flushing the DNS Cache to utilize new hosts file...')
@@ -383,7 +384,8 @@ def isValidDomainFormat(domain):
         return False
     domainRegex = re.compile("www\d{0,3}[.]|https?")
     if domainRegex.match(domain):
-        print ("The domain " + domain + " is not valid. Do not include www.domain.com or http(s)://domain.com. Try again.")
+        print ("The domain " + domain + " is not valid. " +
+               "Do not include www.domain.com or http(s)://domain.com. Try again.")
         return False
     else:
         return True
git clone https://git.99rst.org/PROJECT