Skip to content

Commit

Permalink
Merge pull request #151 from bordaigorl/devel
Browse files Browse the repository at this point in the history
Fix Evernote Library for ST 3126
  • Loading branch information
Emanuele D'Osualdo authored Oct 5, 2016
2 parents c11172d + 77150ea commit 4ca18ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Evernote for Sublime Text
=========================

[![pc badge]][pc]
[![release badge]][release]
[![licence badge]][licence]
[![stars badge]][repo]
[![issues badge]][issues]
[![tips badge]][gratipay]
[![paypal badge]][paypal]
[![chat badge]][gitter]

Expand Down Expand Up @@ -324,7 +324,9 @@ Libraries (some adapted to work with Evernote formats):
[licence]: <https://raw.githubusercontent.com/bordaigorl/sublime-evernote/master/LICENSE>
[issues]: <https://github.com/bordaigorl/sublime-evernote/issues>
[repo]: <https://github.com/bordaigorl/sublime-evernote/>
[pc]: <https://packagecontrol.io/packages/Evernote>

[pc badge]: https://packagecontrol.herokuapp.com/downloads/Evernote.svg
[release badge]: https://img.shields.io/github/release/bordaigorl/sublime-evernote.svg
[licence badge]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[stars badge]: https://img.shields.io/github/stars/bordaigorl/sublime-evernote.svg
Expand Down
11 changes: 8 additions & 3 deletions lib/thrift/transport/THttpClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
import os
import socket
import sys
import urllib.parse
try:
import urllib.parse
quote = urllib.parse.quote
urlparse = urllib.parse.urlparse
except:
from urllib.parse import quote, urlparse
import warnings

from io import BytesIO
Expand Down Expand Up @@ -51,7 +56,7 @@ def __init__(self, uri_or_host, port=None, path=None):
self.path = path
self.scheme = 'http'
else:
parsed = urllib.parse.urlparse(uri_or_host)
parsed = urlparse(uri_or_host)
self.scheme = parsed.scheme
assert self.scheme in ('http', 'https')
if self.scheme == 'http':
Expand Down Expand Up @@ -131,7 +136,7 @@ def flush(self):
user_agent = 'Python/THttpClient'
script = os.path.basename(sys.argv[0])
if script:
user_agent = '%s (%s)' % (user_agent, urllib.parse.quote(script))
user_agent = '%s (%s)' % (user_agent, quote(script))
self.__http.putheader('User-Agent', user_agent)

if self.__custom_headers:
Expand Down

0 comments on commit 4ca18ef

Please sign in to comment.