Skip to content

Commit

Permalink
#1891: python3 compatibility
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19776 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 30, 2018
1 parent 262a717 commit 3229513
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cups/xpraforwarder
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

import sys, os, syslog
import subprocess, traceback
import urlparse
try:
#py2:
from urlparse import urlparse, parse_qs
except ImportError:
from urllib.parse import urlparse, parse_qs

__version__ = "2.2"

Expand Down Expand Up @@ -112,8 +116,8 @@ def do_main():

dev_uri = os.environ['DEVICE_URI']
info("DEVICE_URI=%s" % dev_uri)
parsed_url = urlparse.urlparse(dev_uri)
attributes = urlparse.parse_qs(parsed_url.query)
parsed_url = urlparse(dev_uri)
attributes = parse_qs(parsed_url.query)
info("parsed attributes=%s" % attributes)
def aget(k, default_value=""):
v = attributes.get(k)
Expand Down

0 comments on commit 3229513

Please sign in to comment.