On Thu, Feb 14, 2013 at 3:06 PM, Dimitris Aragiorgis <[email protected]> wrote:
> In case there are no tags (None) " ".join(tag) fails. Run that
> only in case of existing tags.
>
> Signed-off-by: Dimitris Aragiorgis <[email protected]>
> ---
>  lib/objects.py |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/objects.py b/lib/objects.py
> index 2f90ea5..a13afa5 100644
> --- a/lib/objects.py
> +++ b/lib/objects.py
> @@ -2053,8 +2053,9 @@ class Network(TaggableObject):
>      result = {
>        "%sNETWORK_NAME" % prefix: self.name,
>        "%sNETWORK_UUID" % prefix: self.uuid,
> -      "%sNETWORK_TAGS" % prefix: " ".join(self.tags),
>      }
> +    if self.tags:
> +      result["%sNETWORK_TAGS" % prefix] = " ".join(self.tags)

self.tags in case of no tags should be an empty list, not "None".
Is this not the case for you?

thanks,

Guido

Reply via email to