Going with pylint's recommendation for singleton comparisons.
authorSteven Black <redacted>
Mon, 8 Feb 2016 00:41:44 +0000 (19:41 -0500)
committerSteven Black <redacted>
Mon, 8 Feb 2016 00:41:44 +0000 (19:41 -0500)
updateHostsFile.py

index 662b26abfd9c5d718085ac51cec0618bf07cbdcd..4b1ae72c9c508513e4c7ea6f9d868eb2956b27ce 100644 (file)
@@ -159,7 +159,7 @@ def gatherCustomExclusions():
         domainFromUser = myInput("Enter the domain you want to exclude (e.g. facebook.com): ")
         if isValidDomainFormat(domainFromUser):
             excludeDomain(domainFromUser)
-        if promptForMoreCustomExclusions() == False:
+        if promptForMoreCustomExclusions() is False:
             return
 
 def excludeDomain(domain):
@@ -177,7 +177,7 @@ def matchesExclusions(strippedRule):
 def updateAllSources():
     for source in SOURCES:
         updateURL = getUpdateURLFromFile(source)
-        if updateURL == None:
+        if updateURL is None:
             continue
         print ("Updating source " + source + " from " + updateURL)
         # Cross-python call
@@ -356,7 +356,7 @@ def query_yes_no(question, default = "yes"):
     """
     valid = {"yes":"yes", "y":"yes", "ye":"yes",
              "no":"no", "n":"no"}
-    if default == None:
+    if default is None:
         prompt = " [y/n] "
     elif default == "yes":
         prompt = " [Y/n] "
git clone https://git.99rst.org/PROJECT