Explicit "is None"

This commit is contained in:
Seth Schoen
2015-05-14 12:28:24 -07:00
parent e469ae4ed8
commit 9556203ae9
+1 -1
View File
@@ -147,7 +147,7 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes
raise ValueError("unknown kind of item") raise ValueError("unknown kind of item")
pattern = re.compile(r"^{0}([0-9]+)\.pem$".format(kind)) pattern = re.compile(r"^{0}([0-9]+)\.pem$".format(kind))
target = self.current_target(kind) target = self.current_target(kind)
if not target or not os.path.exists(target): if target is None or not os.path.exists(target):
target = "" target = ""
matches = pattern.match(os.path.basename(target)) matches = pattern.match(os.path.basename(target))
if matches: if matches: