Skip to content

Commit 5c348dd

Browse files
author
Sharoon Thomas
committed
Improved handling of JSOn Decode errors
1 parent adbaa96 commit 5c348dd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414

1515
try:
1616
import simplejson as json
17+
from simplejson import JSONDecodeError
1718
except ImportError:
1819
import json
20+
class JSONDecodeError(Exception): pass
21+
# Ugly: No alternative because this exception class doesnt seem to be there
22+
# in the standard python module
1923
import urllib
2024

2125

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def read(fname):
3434

3535
setup(
3636
name = "microsofttranslator",
37-
version = "0.2",
37+
version = "0.3",
3838
packages = [
3939
'microsofttranslator'
4040
],

0 commit comments

Comments
 (0)