Commit 131c403b by xgecko

Condensed nested if statements

parent ae68dc1a
...@@ -91,8 +91,7 @@ class Locator(object): ...@@ -91,8 +91,7 @@ class Locator(object):
if template_extension is None: if template_extension is None:
template_extension = self.template_extension template_extension = self.template_extension
if template_extension is not False: if template_extension is not False and not file_name.endswith(template_extension):
if not file_name.endswith(template_extension):
file_name += os.path.extsep + template_extension file_name += os.path.extsep + template_extension
return file_name return file_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment