mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
Fix tools/review for python3.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user