On 27 January 2014 19:28, Andy Doan <email address hidden> wrote:
> 2) Are you sure code like:
> code_runner = config['user_code_runner']
>
> is safe when no value is provided and default is intended? When I've done this in the past, there is no dictionary item for elements that aren't specified explicitly. so i've always had to do: config.get('user_code_runner', 'restish'). Seems odd/annoying juju wouldn't do that for me, so maybe you know a trick
user_code_runner:
default: "restish"
type: string
description: The user that runs the code
On 27 January 2014 19:28, Andy Doan <email address hidden> wrote: 'user_code_ runner' ] get('user_ code_runner' , 'restish'). Seems odd/annoying juju wouldn't do that for me, so maybe you know a trick
> 2) Are you sure code like:
> code_runner = config[
>
> is safe when no value is provided and default is intended? When I've done this in the past, there is no dictionary item for elements that aren't specified explicitly. so i've always had to do: config.
user_code_runner:
default: "restish"
type: string
description: The user that runs the code
So it's guaranteed to at least set to 'restish'.