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>
Felipe Contreras committed
May 13, 2013 at 23:36 UTC
557399e9bd2d2e8d13fac2ca9dbe4d6aa811e23c
1 file changed
+9
-15
contrib/remote-helpers/git-remote-hg
+9
-15
@@ -327,11 +327,8 @@ def get_repo(url, alias):
327
myui.setconfig('ui', 'interactive', 'off')
328
myui.fout = sys.stderr
329
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', '')
332
333
try:
334
mod = extensions.load(myui, 'hgext.schemes', None)
@@ -910,16 +907,13 @@ def main(args):
907
track_branches = True
908
force_push = True
909
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
917
918
if hg_git_compat:
919
mode = 'hg'