[Merge] lp:~sil2100/merge-o-matic/exclude-pkgs-from-stats into lp:merge-o-matic

Brian Murray brian at ubuntu.com
Fri Jan 5 19:32:47 UTC 2018


One in-line comment.

Diff comments:

> 
> === modified file 'stats.py'
> --- stats.py	2017-07-06 19:11:04 +0000
> +++ stats.py	2017-12-19 15:52:21 +0000
> @@ -39,6 +40,27 @@
>      )
>  
>  
> +def read_excluded_packages(path):
> +    if not path or not os.path.isfile(path):

I believe the 'not path or' part of this is unnecessary as optparse will return an error if '-E' is used without an argument.

> +        return set()
> +
> +    exclude = set()
> +    with open(path) as excludelist:
> +        for line in excludelist:
> +            try:
> +                line = line[:line.index("#")]
> +            except ValueError:
> +                pass
> +
> +            line = line.strip()
> +            if not line:
> +                continue
> +
> +            exclude.add(line)
> +
> +    return exclude
> +
> +
>  def options(parser):
>      parser.add_option("-D", "--source-distro", type="string", metavar="DISTRO",
>                        default=SRC_DISTRO,


-- 
https://code.launchpad.net/~sil2100/merge-o-matic/exclude-pkgs-from-stats/+merge/335387
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~sil2100/merge-o-matic/exclude-pkgs-from-stats into lp:merge-o-matic.



More information about the Ubuntu-reviews mailing list