From 59470368d3c3ebb9394346312147c1e19be85129 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Wed, 30 Oct 2013 07:39:25 +0000 Subject: [PATCH] 7167: support python2.6 where str.format() is used svn: r23442 --- src/Utils.py | 4 ++-- src/gen/lib/date.py | 4 ++-- src/gen/lib/test/date_test.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Utils.py b/src/Utils.py index 9dc46d950..55b07286a 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -837,7 +837,7 @@ class ProbablyAlive(object): return (date1, date2, explain, other) def ancestors_too_old(person, year): - LOG.debug("ancestors_too_old('{}', {})".format( + LOG.debug("ancestors_too_old('{0}', {1})".format( name_displayer.display(person), year) ) family_handle = person.get_main_parents_family_handle() if family_handle: @@ -986,7 +986,7 @@ def probably_alive(person, db, max_sib_age_diff, max_age_prob_alive, avg_generation_gap) if current_date is None: current_date = gen.lib.date.Today() - LOG.debug("{}: b.{}, d.{} - {}".format( + LOG.debug("{0}: b.{1}, d.{2} - {3}".format( " ".join(person.get_primary_name().get_text_data_list()), birth, death, explain)) if not birth or not death: diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index c5a7e4b15..f87947504 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -1616,7 +1616,7 @@ class Date(object): for adjusted,original in d,m: if adjusted != original and not(original == 0 and adjusted == 1): - log.debug("Sanity check failed - self: {}, sanity: {}".format( + log.debug("Sanity check failed - self: {0}, sanity: {1}".format( self.dateval, sanity.dateval)) raise DateError("Invalid day/month {} passed in value {}". format(original, value)) @@ -1624,7 +1624,7 @@ class Date(object): adjusted,original = y adjusted -= year_delta if adjusted != original and not(original == 0 and adjusted == 1): - log.debug("Sanity check failed - self: {}, sanity: {}".format( + log.debug("Sanity check failed - self: {0}, sanity: {1}".format( self.dateval, sanity.dateval)) raise DateError("Invalid year {} passed in value {}". format(original, value)) diff --git a/src/gen/lib/test/date_test.py b/src/gen/lib/test/date_test.py index 6e2b0ff85..ac4f15047 100644 --- a/src/gen/lib/test/date_test.py +++ b/src/gen/lib/test/date_test.py @@ -510,7 +510,7 @@ class Test_set2(unittest.TestCase): try: function(self.date) self.assertTrue(False, - "Modifier: {}, dateval: {} - exception expected!".format( + "Modifier: {0}, dateval: {1} - exception expected!".format( mod, self.date.dateval)) except DateError: pass