• 
      

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

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

    Information

    Djblets
    release-2.x

    Reviewers

    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.

    Commits

    Files