提交 bce68b03 authored 作者: Josh Bleecher Snyder's avatar Josh Bleecher Snyder

Code elegance fail

上级 96c0e229
...@@ -81,7 +81,7 @@ class MercurialRuntimeError(Exception): ...@@ -81,7 +81,7 @@ class MercurialRuntimeError(Exception):
pass pass
def run_mercurial_command(hg_command): def run_mercurial_command(hg_command):
hg_executable = os.environ.get("HG", None) or "hg" hg_executable = os.environ.get("HG", "hg")
hg_command_tuple = hg_command.split() hg_command_tuple = hg_command.split()
hg_command_tuple.insert(0, hg_executable) hg_command_tuple.insert(0, hg_executable)
try: try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论