remote-hg: get rid of unused exception checks
Remove try/except check because we are no longer calling check_output(), which may throw an exception. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
eb7976e7dd
commit
557399e9bd
@ -327,11 +327,8 @@ def get_repo(url, alias):
|
|||||||
myui.setconfig('ui', 'interactive', 'off')
|
myui.setconfig('ui', 'interactive', 'off')
|
||||||
myui.fout = sys.stderr
|
myui.fout = sys.stderr
|
||||||
|
|
||||||
try:
|
if get_config('remote-hg.insecure') == 'true\n':
|
||||||
if get_config('remote-hg.insecure') == 'true\n':
|
myui.setconfig('web', 'cacerts', '')
|
||||||
myui.setconfig('web', 'cacerts', '')
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mod = extensions.load(myui, 'hgext.schemes', None)
|
mod = extensions.load(myui, 'hgext.schemes', None)
|
||||||
@ -910,16 +907,13 @@ def main(args):
|
|||||||
track_branches = True
|
track_branches = True
|
||||||
force_push = True
|
force_push = True
|
||||||
|
|
||||||
try:
|
if get_config('remote-hg.hg-git-compat') == 'true\n':
|
||||||
if get_config('remote-hg.hg-git-compat') == 'true\n':
|
hg_git_compat = True
|
||||||
hg_git_compat = True
|
track_branches = False
|
||||||
track_branches = False
|
if get_config('remote-hg.track-branches') == 'false\n':
|
||||||
if get_config('remote-hg.track-branches') == 'false\n':
|
track_branches = False
|
||||||
track_branches = False
|
if get_config('remote-hg.force-push') == 'false\n':
|
||||||
if get_config('remote-hg.force-push') == 'false\n':
|
force_push = False
|
||||||
force_push = False
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if hg_git_compat:
|
if hg_git_compat:
|
||||||
mode = 'hg'
|
mode = 'hg'
|
||||||
|
Reference in New Issue
Block a user