Skip to content

Commit

Permalink
Merge pull request #4 from JordanReiter/patch-1
Browse files Browse the repository at this point in the history
Jordan, thank you for the enhancement!
  • Loading branch information
btimby committed Nov 16, 2012
2 parents eefa306 + ddbc73a commit 8444f91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fulltext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ def get(f, default=NoDefault, filename=None, type=None):
if default is not NoDefault:
return default
raise FullTextException('File not found')
if not filename:
try:
filename = os.path.basename(f.url)
except AttributeError:
pass
if type is None:
type = get_type(filename)
handler = FUNC_MAP.get(type, read_content)
Expand Down

0 comments on commit 8444f91

Please sign in to comment.