Skip to content

Commit

Permalink
Use try/except instead of checking the function existence
Browse files Browse the repository at this point in the history
  • Loading branch information
iafan authored and unho committed Mar 20, 2014
1 parent af98de5 commit 6110627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pootle/apps/pootle_store/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ def timeline(request, unit):

for key, values in groupby(timeline, key=lambda x: x.creation_time):
# Under Windows, the "nl_langinfo" method is not available
if "nl_langinfo" in vars(locale):
try:
time_str = key.strftime(locale.nl_langinfo(locale.D_T_FMT))
else:
except NameError:
time_str = key
entry_group = {
'datetime': key,
Expand Down

0 comments on commit 6110627

Please sign in to comment.