Skip to content

Commit 557399e

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eb7976e commit 557399e

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

contrib/remote-helpers/git-remote-hg

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,8 @@ def get_repo(url, alias):
327327
myui.setconfig('ui', 'interactive', 'off')
328328
myui.fout = sys.stderr
329329

330-
try:
331-
if get_config('remote-hg.insecure') == 'true\n':
332-
myui.setconfig('web', 'cacerts', '')
333-
except subprocess.CalledProcessError:
334-
pass
330+
if get_config('remote-hg.insecure') == 'true\n':
331+
myui.setconfig('web', 'cacerts', '')
335332

336333
try:
337334
mod = extensions.load(myui, 'hgext.schemes', None)
@@ -910,16 +907,13 @@ def main(args):
910907
track_branches = True
911908
force_push = True
912909

913-
try:
914-
if get_config('remote-hg.hg-git-compat') == 'true\n':
915-
hg_git_compat = True
916-
track_branches = False
917-
if get_config('remote-hg.track-branches') == 'false\n':
918-
track_branches = False
919-
if get_config('remote-hg.force-push') == 'false\n':
920-
force_push = False
921-
except subprocess.CalledProcessError:
922-
pass
910+
if get_config('remote-hg.hg-git-compat') == 'true\n':
911+
hg_git_compat = True
912+
track_branches = False
913+
if get_config('remote-hg.track-branches') == 'false\n':
914+
track_branches = False
915+
if get_config('remote-hg.force-push') == 'false\n':
916+
force_push = False
923917

924918
if hg_git_compat:
925919
mode = 'hg'

0 commit comments

Comments
 (0)