Skip to content

Commit 23a1336

Browse files
Sam Pillsworthalphapapa
Sam Pillsworth
authored andcommitted
Fix: Python 2-3 compatibility
Closes #31. Thanks to Sam Pillsworth (@samspills).
1 parent b2a2ebb commit 23a1336

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.org

+4
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ org-protocol-capture-html.sh -h "TODO Feed the cat!" -t i "He gets grouchy if I
142142

143143
* Changelog :noexport_1:
144144

145+
** <2019-05-12>
146+
147+
+ Python 2-3 compatibility fixes in =org-protocol-capture-html.sh=. ([[https://github.com/alphapapa/org-protocol-capture-html/pull/31][#31]]. Thanks to [[https://github.com/samspills][Sam Pillsworth]].)
148+
145149
** <2017-04-17>
146150

147151
+ Use [[https://github.com/magnars/s.el][s.el]].

org-protocol-capture-html.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ EOF
4848

4949
function urlencode {
5050
python -c "
51+
from __future__ import print_function
5152
try:
5253
from urllib import quote # Python 2
5354
except ImportError:
5455
from urllib.parse import quote # Python 3
56+
import sys
5557
56-
import sys, urllib
57-
58-
print urllib.quote(sys.stdin.read()[:-1], safe='')"
58+
print(quote(sys.stdin.read()[:-1], safe=''))"
5959
}
6060

6161
# * Args

0 commit comments

Comments
 (0)