transifex / transifex-client

The Transifex command-line tool.
https://www.transifex.com/
GNU General Public License v2.0
135 stars 75 forks source link

Fix test_in_combination_with_force_option on 32 bit systems #316

Closed robert7k closed 1 year ago

robert7k commented 3 years ago

The test test_in_combination_with_force_option fails on 32 bit systems due to an integer overflow.

Traceback (most recent call last): File "tests/test_project.py", line 722, in test_in_combination_with_force_option res = self.p._should_download( File "txclib/project.py", line 1061, in _should_download if not self._remote_is_newer(remote_update, local_file, use_git_timestamps): File "txclib/project.py", line 1185, in _remote_is_newer local_time = self._get_time_of_local_file( File "txclib/project.py", line 1135, in _get_time_of_local_file return time.mktime(time.gmtime(epoch_timestamp)) OverflowError: timestamp out of range for platform time_t

This fix should work at least for the next 17 years.

akien-mga commented 2 years ago

I confirm the bug, and the fix works.