summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-13 23:36:25 -0500
committerJunio C Hamano <gitster@pobox.com>2013-05-15 12:31:54 -0700
commit557399e9bd2d2e8d13fac2ca9dbe4d6aa811e23c (patch)
treef83161369d69550c782aba5a6e4c83ad4c2d92bd
parenteb7976e7dddf70f0f4a7d05e3d86a33bf163abf2 (diff)
downloadgit-557399e9bd2d2e8d13fac2ca9dbe4d6aa811e23c.tar.gz
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>
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg24
1 files changed, 9 insertions, 15 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index d33c7bafc3..9d6940b927 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -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)
@@ -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'