Commit 131c403b by xgecko

Condensed nested if statements

parent ae68dc1a
......@@ -91,9 +91,8 @@ class Locator(object):
if template_extension is None:
template_extension = self.template_extension
if template_extension is not False:
if not file_name.endswith(template_extension):
file_name += os.path.extsep + template_extension
if template_extension is not False and not file_name.endswith(template_extension):
file_name += os.path.extsep + template_extension
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