Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomofkeima committed Jan 30, 2017
1 parent 20c728e commit 4a80cbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maidchan/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def get_translation(query):
target_language_str = None

# Split
elements = shlex.split(query.encode('utf-8'))
try:
elements = shlex.split(query.encode('utf-8'))
except Exception:
elements = [query.encode('utf-8')]
source_list = []
skip = False
for index, element in enumerate(elements):
Expand Down

0 comments on commit 4a80cbe

Please sign in to comment.