Skip to content

Commit

Permalink
remote-hg: get rid of unused exception checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed May 15, 2013
1 parent eb7976e commit 557399e
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions contrib/remote-helpers/git-remote-hg
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,8 @@ def get_repo(url, alias):
myui.setconfig('ui', 'interactive', 'off')
myui.fout = sys.stderr

try:
if get_config('remote-hg.insecure') == 'true\n':
myui.setconfig('web', 'cacerts', '')
except subprocess.CalledProcessError:
pass
if get_config('remote-hg.insecure') == 'true\n':
myui.setconfig('web', 'cacerts', '')

try:
mod = extensions.load(myui, 'hgext.schemes', None)
Expand Down Expand Up @@ -910,16 +907,13 @@ def main(args):
track_branches = True
force_push = True

try:
if get_config('remote-hg.hg-git-compat') == 'true\n':
hg_git_compat = True
track_branches = False
if get_config('remote-hg.track-branches') == 'false\n':
track_branches = False
if get_config('remote-hg.force-push') == 'false\n':
force_push = False
except subprocess.CalledProcessError:
pass
if get_config('remote-hg.hg-git-compat') == 'true\n':
hg_git_compat = True
track_branches = False
if get_config('remote-hg.track-branches') == 'false\n':
track_branches = False
if get_config('remote-hg.force-push') == 'false\n':
force_push = False

if hg_git_compat:
mode = 'hg'
Expand Down

0 comments on commit 557399e

Please sign in to comment.