Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
check http accept language if it is null. could occur if using e.g. curl
Browse files Browse the repository at this point in the history
  • Loading branch information
iocast committed Jan 2, 2014
1 parent afddf67 commit 55f5a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bottle_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def setup(self, app):
app.__class__.lang = property(fget=lambda x: self.get_lang(), fset=lambda x, value: self.set_lang(value))

def parse_accept_language(self, accept_language):
if accept_language == None:
return []
languages = accept_language.split(",")
locale_q_pairs = []

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name = 'bottle-i18n',
version = '0.1.3',
version = '0.1.4',
description = 'I18N integration for Bottle.',
long_description = long_description,
author = 'iocast',
Expand Down

0 comments on commit 55f5a02

Please sign in to comment.