Skip to content

Commit

Permalink
python2-3 compatibility fixes: print_function, quote reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Pillsworth committed Mar 23, 2019
1 parent b2a2ebb commit 13a8761
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions org-protocol-capture-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ EOF

function urlencode {
python -c "
from __future__ import print_function
try:
from urllib import quote # Python 2
except ImportError:
from urllib.parse import quote # Python 3
import sys
import sys, urllib
print urllib.quote(sys.stdin.read()[:-1], safe='')"
print(quote(sys.stdin.read()[:-1], safe=''))"
}

# * Args
Expand Down

0 comments on commit 13a8761

Please sign in to comment.