From 18341a6d4a0336ce0f8bf36a3b6b7b4c514f51ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 8 Oct 2011 11:25:38 +0000 Subject: [PATCH] 5285: Add a blank entry on countries list (same as Calendar) svn: r18259 --- src/plugins/textreport/BirthdayReport.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index 44051abd8..15f303d0d 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -370,10 +370,11 @@ class CalendarOptions(MenuReportOptions): country = EnumeratedListOption(_("Country for holidays"), 0) holiday_table = libholiday.HolidayTable() - holiday_table.sort() - if (len(holiday_table) == 0 or - (len(holiday_table) > 0 and holiday_table[0] != '')): - holiday_table.insert(0, '') + countries = holiday_table.get_countries() + countries.sort() + if (len(countries) == 0 or + (len(countries) > 0 and countries[0] != '')): + countries.insert(0, '') count = 0 for c in holiday_table.get_countries(): country.add_item(count, c)