Merge ~pappacena/turnip:py3-pack-git-bin-strings into turnip:master

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: 2aaa5429b295ffb5d16a08732a7b5454266bebd3
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/turnip:py3-pack-git-bin-strings
Merge into: turnip:master
Diff against target: 27 lines (+4/-3)
1 file modified
turnip/pack/git.py (+4/-3)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+391243@code.launchpad.net

Commit message

Making SAFE_PARAMS a set of bytes, and store.init_repo call to use str for paths (like the API does)

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/turnip/pack/git.py b/turnip/pack/git.py
2index be1c956..4407085 100644
3--- a/turnip/pack/git.py
4+++ b/turnip/pack/git.py
5@@ -44,7 +44,7 @@ from turnip.pack.helpers import (
6 ERROR_PREFIX = b'ERR '
7 VIRT_ERROR_PREFIX = b'turnip virt error: '
8
9-SAFE_PARAMS = frozenset(['host', 'version'])
10+SAFE_PARAMS = frozenset([b'host', b'version'])
11
12
13 class RequestIDLogger(Logger):
14@@ -531,10 +531,11 @@ class PackBackendProtocol(PackServerProtocol):
15 try:
16 repo_path = compose_path(self.factory.root, pathname)
17 if clone_from:
18- clone_path = compose_path(self.factory.root, clone_from)
19+ clone_path = six.ensure_str(
20+ compose_path(self.factory.root, clone_from))
21 else:
22 clone_path = None
23- store.init_repo(repo_path, clone_path)
24+ store.init_repo(six.ensure_str(repo_path), clone_path)
25 yield proxy.callRemote(
26 "confirmRepoCreation", six.ensure_text(pathname),
27 auth_params).addTimeout(xmlrpc_timeout, default_reactor)

Subscribers

People subscribed via source and target branches