/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_timestamp.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-21 22:07:46 UTC
  • mto: This revision was merged to the branch mainline in revision 7208.
  • Revision ID: jelmer@jelmer.uk-20181121220746-l1tynnionjpjrdzn
Handle overflow errors on Python 2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
            t += random.random() * 24 * 3600 * 30
140
140
            try:
141
141
                time.gmtime(t)
142
 
            except OverflowError:
 
142
            except (OverflowError, ValueError):
143
143
                # We've reached the maximum for time_t on this platform
144
144
                break
145
145
            if time.localtime(t).tm_year > 9998: