Commit b975e6aa by Chris Jerdonek

Eliminated another use of the ternary operator for Python 2.4 support.

parent 1db59132
...@@ -36,12 +36,15 @@ class SpecLoader(object): ...@@ -36,12 +36,15 @@ class SpecLoader(object):
""" """
if spec.template_rel_path is not None: if spec.template_rel_path is not None:
return os.path.split(spec.template_rel_path) return os.path.split(spec.template_rel_path)
# Otherwise, determine the file name separately. # Otherwise, determine the file name separately.
locator = self.loader._make_locator() locator = self.loader._make_locator()
template_name = (spec.template_name if spec.template_name is not None else # We do not use the ternary operator for Python 2.4 support.
locator.make_template_name(spec)) if spec.template_name is not None:
template_name = spec.template_name
else:
template_name = locator.make_template_name(spec)
file_name = locator.make_file_name(template_name, spec.template_extension) file_name = locator.make_file_name(template_name, spec.template_extension)
......
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