Skip to content

Commit 6f7c4d5

Browse files
committed
Sáb Out 8 12:57:19 BRT 2016
1 parent 5fc8e08 commit 6f7c4d5

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

SQLToolsAPI/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## SQLTools API for plugins - v0.2.0
1+
## SQLTools API for plugins - v0.2.1
22

33
Docs will be ready soon

SQLToolsAPI/Utils.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import re
66
import sys
77

8-
if os.path.join(os.path.dirname(__file__), 'lib') not in sys.path:
9-
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
8+
dirpath = os.path.join(os.path.dirname(__file__), 'lib')
9+
if dirpath not in sys.path:
10+
sys.path.append(dirpath)
1011

1112
from sqlparse import format
1213

@@ -28,7 +29,7 @@ def parseJson(filename):
2829
*/
2930
"""
3031

31-
with open(filename) as f:
32+
with open(filename, mode='r', encoding='utf-8') as f:
3233
content = ''.join(f.readlines())
3334

3435
# Looking for comments
@@ -39,13 +40,13 @@ def parseJson(filename):
3940
match = comment_re.search(content)
4041

4142
# Return json file
42-
return json.loads(content)
43+
return json.loads(content, encoding='utf-8')
4344

4445

4546
def saveJson(content, filename):
46-
with open(filename, 'w') as outfile:
47+
with open(filename, mode='w', encoding='utf-8') as outfile:
4748
json.dump(content, outfile,
48-
sort_keys=True, indent=2, separators=(',', ': '))
49+
sort_keys=True, indent=2, separators=(',', ': '), encoding="utf-8")
4950

5051

5152
def getResultAsList(results):

SQLToolsAPI/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "v0.2.0"
1+
__version__ = "v0.2.1"
22

33

44
__all__ = [

0 commit comments

Comments
 (0)