Fixed None type error message after getting the locale setting

This commit is contained in:
Oğuz Yarımtepe 2008-12-18 19:16:40 +00:00
parent 8aa18bf4cb
commit e584c1e25c
2 changed files with 19 additions and 15 deletions

View File

@ -91,7 +91,12 @@ def template_info(item, date_format):
#set the locale so that the dates at the feeds will be in english #set the locale so that the dates at the feeds will be in english
lc=locale.getlocale() lc=locale.getlocale()
if lc[0].find("tr") != -1: if lc[0] == None:
try:
locale.setlocale(locale.LC_ALL, '')
except:
pass
elif lc[0].find("tr") != -1:
try: try:
locale.setlocale(locale.LC_ALL, '') locale.setlocale(locale.LC_ALL, '')
except: except:

View File

@ -107,7 +107,7 @@
<foaf:name>Alper Orus</foaf:name> <foaf:name>Alper Orus</foaf:name>
<foaf:weblog> <foaf:weblog>
<foaf:Document rdf:about="http://www.murekkep.org"> <foaf:Document rdf:about="http://www.murekkep.org">
<dc:title>Mürekkep - İnternet Yaşam Rehberiniz » admin</dc:title> <dc:title>Mürekkep - İnternet Yaşam Rehberiniz » Bilişim</dc:title>
<rdfs:seeAlso> <rdfs:seeAlso>
<rss:channel rdf:about="" /> <rss:channel rdf:about="" />
</rdfs:seeAlso> </rdfs:seeAlso>
@ -245,20 +245,19 @@
</foaf:weblog> </foaf:weblog>
</foaf:Agent> </foaf:Agent>
</foaf:member> </foaf:member>
<foaf:member> <foaf:member>
<foaf:Agent> <foaf:Agent>
<foaf:name>Ceyhun Alyeşil</foaf:name> <foaf:name>Ceyhun Alyeşil</foaf:name>
<foaf:weblog> <foaf:weblog>
<foaf:Document rdf:about="http://devador.blogspot.com"> <foaf:Document rdf:about="">
<dc:title></dc:title> <dc:title></dc:title>
<rdfs:seeAlso> <rdfs:seeAlso>
<rss:channel rdf:about="" /> <rss:channel rdf:about="" />
</rdfs:seeAlso> </rdfs:seeAlso>
</foaf:Document> </foaf:Document>
</foaf:weblog> </foaf:weblog>
</foaf:Agent> </foaf:Agent>
</foaf:member> </foaf:member>
<foaf:member> <foaf:member>
<foaf:Agent> <foaf:Agent>
<foaf:name>Deniz Koçak</foaf:name> <foaf:name>Deniz Koçak</foaf:name>