Skip to content

Commit

Permalink
Fix: urlencode is in urllib.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
randy3k committed Mar 7, 2018
1 parent 7ddd7cb commit 9cbcdc4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion github/commands/pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def open_comparision_in_browser(self, owner, branch):
base_owner = base_remote.owner
base_branch = self.get_integrated_branch_name()

open_in_browser(urllib.urlencode("{}/compare/{}:{}...{}:{}?expand=1".format(
open_in_browser(urllib.parse.urlencode("{}/compare/{}:{}...{}:{}?expand=1".format(
url,
base_owner,
base_branch,
Expand Down
4 changes: 2 additions & 2 deletions github/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def open_file_in_browser(rel_path, remote, commit_hash, start_line=None, end_lin
lines=line_numbers
)

open_in_browser(urllib.urlencode(url))
open_in_browser(urllib.parse.urlencode(url))


def open_repo(remote):
Expand Down Expand Up @@ -147,7 +147,7 @@ def github_api_url(api_url_template, repository, **kwargs):
return fqdn, "{base_path}{path}?{query_params}".format(
base_path=base_path,
path=request_path,
query_params=interwebs.urlencode(kwargs))
query_params=interwebs.parse.urlencode(kwargs))


def validate_response(response, method="GET"):
Expand Down
2 changes: 1 addition & 1 deletion gitlab/commands/merge_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def open_mr_in_browser(self):
# base_owner = base_remote.owner
# base_branch = self.get_integrated_branch_name()

# open_in_browser(urllib.urlencode("{}/compare/{}:{}...{}:{}?expand=1".format(
# open_in_browser(urllib.parse.urlencode("{}/compare/{}:{}...{}:{}?expand=1".format(
# url,
# base_owner,
# base_branch,
Expand Down
4 changes: 2 additions & 2 deletions gitlab/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def open_file_in_browser(rel_path, remote, commit_hash, start_line=None, end_lin
lines=line_numbers
)

open_in_browser(urllib.urlencode(url))
open_in_browser(urllib.parse.urlencode(url))


def open_repo(remote):
Expand Down Expand Up @@ -151,7 +151,7 @@ def gitlab_api_url(api_url_template, repository, url_params={}, **kwargs):
return fqdn, "{base_path}{path}?{query_params}".format(
base_path=base_path,
path=request_path,
query_params=interwebs.urlencode(kwargs))
query_params=interwebs.parse.urlencode(kwargs))


def validate_response(response, method="GET"):
Expand Down

0 comments on commit 9cbcdc4

Please sign in to comment.