Skip to content

Commit

Permalink
browse.py: Python 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekensteyn committed Mar 11, 2016
1 parent 572cc8e commit f749139
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
import subprocess
import sys
import webbrowser
import urllib2
try:
from urllib.request import unquote
except ImportError:
from urllib2 import unquote
from collections import namedtuple

Node = namedtuple('Node', ['inputs', 'rule', 'target', 'outputs'])
Expand Down Expand Up @@ -154,7 +157,7 @@ def ninja_dump(target):
class RequestHandler(httpserver.BaseHTTPRequestHandler):
def do_GET(self):
assert self.path[0] == '/'
target = urllib2.unquote(self.path[1:])
target = unquote(self.path[1:])

if target == '':
self.send_response(302)
Expand Down

0 comments on commit f749139

Please sign in to comment.