mirror of
https://github.com/facebook/sapling.git
synced 2025-01-08 14:46:47 +03:00
obsfate: fix obsfate_printer with empty date list
When the list of dates is empty, `min` and `max` would raises a ValueError. Protect against this case by checking that the date list is not empty. I didn't add a test because I couldn't find a reproducing test case.
This commit is contained in:
parent
4b2916f625
commit
3df0c5d74a
@ -822,7 +822,7 @@ def obsfateprinter(successors, markers, ui):
|
||||
# Date
|
||||
dates = markersdates(markers)
|
||||
|
||||
if verbose:
|
||||
if dates and verbose:
|
||||
min_date = min(dates)
|
||||
max_date = max(dates)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user