RE: [PATCH v3 02/10] remote-hg: get rid of unused exception checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is removing an exception check and since that exception is thrown by
check_output() but not Popen(), this doesn't change anything.

Felipe Contreras wrote:
> We are not calling check_output() anymore.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> ---
>  contrib/remote-helpers/git-remote-hg | 24 +++++++++---------------
>  1 file changed, 9 insertions(+), 15 deletions(-)
> 
> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
> index d33c7ba..9d6940b 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'
> -- 
> 1.8.3.rc1.579.g184e698

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]