Changes for Gramps-Connect to work on Windows without using gramps.py

svn: r19846
This commit is contained in:
Doug Blank
2012-06-15 19:52:33 +00:00
parent c7499652d6
commit d6f3dfb5dd
3 changed files with 14 additions and 4 deletions

View File

@@ -144,7 +144,10 @@ def probably_alive(handle):
def format_number(number, with_grouping=True):
# FIXME: should be user's setting
locale.setlocale(locale.LC_ALL, "en_US.utf8")
try:
locale.setlocale(locale.LC_ALL, "en_US.utf8")
except:
pass
if number != "":
return locale.format("%d", number, with_grouping)
else:
@@ -152,7 +155,10 @@ def format_number(number, with_grouping=True):
def table_count(table, with_grouping=True):
# FIXME: should be user's setting
locale.setlocale(locale.LC_ALL, "en_US.utf8")
try:
locale.setlocale(locale.LC_ALL, "en_US.utf8")
except:
pass
if table == "person":
number = models.Person.objects.count()
elif table == "family":