Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

Commit

Permalink
applied 2to3.
Browse files Browse the repository at this point in the history
  • Loading branch information
gst committed Feb 28, 2014
1 parent 6067d57 commit d2379f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git_remote_hg/__init__.py
Expand Up @@ -84,7 +84,7 @@
import threading
import socket
import time
import urllib
import urllib.request, urllib.parse, urllib.error
import wsgiref.simple_server
from textwrap import dedent

Expand Down Expand Up @@ -163,7 +163,7 @@ class HgGitCheckout(object):

def __init__(self, git_dir, hg_url):
self.hg_url = hg_url
self.hg_name = hg_name = urllib.quote(hg_url, safe="")
self.hg_name = hg_name = urllib.parse.quote(hg_url, safe="")
self.hg_repo_dir = os.path.join(git_dir, "hgremotes", hg_name)
if not os.path.exists(self.hg_repo_dir):
self.initialize_hg_repo()
Expand All @@ -178,7 +178,7 @@ def _do(self, *cmd, **kwds):
output = p.stdout.readline()
while output:
if not silent:
print>>sys.stderr, "hg: " + output.strip()
print("hg: " + output.strip(), file=sys.stderr)
output = p.stdout.readline()
p.wait()

Expand Down Expand Up @@ -246,7 +246,7 @@ def __call__(self, environ, start_response):
enough for local use.
"""
cgienv = os.environ.copy()
for (k,v) in environ.iteritems():
for (k,v) in environ.items():
if isinstance(v, str):
cgienv[k] = v
cgienv["GIT_PROJECT_ROOT"] = self.git_project_root
Expand Down

0 comments on commit d2379f9

Please sign in to comment.