Fix a regression with compiling a brand-new LessCSS file.

Review Request #11430 — Created Feb. 3, 2021 and submitted

chipx86
Djblets
release-2.x
djblets

The new logic for optimizing outdated file checks made an assumption
that the destination file always exists. It tried comparing the source
file's timestamp to the destination's, which would be None. This would
execute just fine on Python 2.7, but not on Python 3, where these types
are not comparable.

This change fixes this by short-circuiting the timestamp comparisons if
None. Unit tests were added to ensure this works correctly on all
versions of Python.

Unit tests pass for all versions of Python.

Encountered this issue during development of a new .less file, and
verified this fixed it.

Summary
Fix a regression with compiling a brand-new LessCSS file.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (00c0563)
Loading...