mirror of https://github.com/zulip/zulip.git
Fix tools/review for python3.
This commit is contained in:
parent
919ca3431f
commit
c26e000d4e
|
@ -15,16 +15,20 @@ def run(command):
|
|||
print('\n>>> ' + command)
|
||||
subprocess.check_call(command.split())
|
||||
|
||||
def check_output(command):
|
||||
# type: (str) -> str
|
||||
return subprocess.check_output(command.split()).decode('ascii')
|
||||
|
||||
def get_git_branch():
|
||||
# type: () -> str
|
||||
command = 'git rev-parse --abbrev-ref HEAD'
|
||||
output = subprocess.check_output(command.split())
|
||||
output = check_output(command)
|
||||
return output.strip()
|
||||
|
||||
def check_git_pristine():
|
||||
# type: () -> None
|
||||
command = 'git status --porcelain'
|
||||
output = subprocess.check_output(command.split())
|
||||
output = check_output(command)
|
||||
if output.strip():
|
||||
exit('Git is not pristine:\n' + output)
|
||||
|
||||
|
|
Loading…
Reference in New Issue