yeah, return should be outside for, reformatting that a bit to make it
clearer ... also fixing spelling



On Wed, Feb 5, 2014 at 5:56 PM, Jakub Warmuz <notifications@github.com>wrote:

> In library/system/debconf:
>
> > +    cmd = [module.get_bin_path('debconf-show', True), pkg]
> > +    rc, out, err = module.run_command(' '.join(cmd))
> > +
> > +    if rc == 0:
> > +        selections = {}
> > +    for line in out.splitlines():
> > +            #if not line.startswith('*'): # only awnsered
> > +            #    continue
> > +            (key, value) = line.split(':')
> > +            selections[ key.strip('*').strip() ] = value.strip()
> > +        return selections
> > +    else:
> > +        module.fail_json(msg=err)
> > +
> > +
> > +def set_selection(module, pkg, question, type, value, unseen):
>
> type is a Python built-in function<http://docs.python.org/2/library/functions.html>and shadowing/rebinding those is considered a bad practice, I'd recommend
> using a different variable name
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/ansible/ansible/pull/5361/files#r9482729>
> .
>



-- 
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno