7167: support python2.6 where str.format() is used
svn: r23442
This commit is contained in:
parent
227a1e6378
commit
59470368d3
@ -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:
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user