oEscal opened a new issue, #17:
URL: https://github.com/apache/openwhisk-composer-python/issues/17

   While trying to use the `pydeploy`'s `annotation` flag, I got the following 
error:
   ```bash
   $ pydeploy <composition> <composition.json> --annotation "a=b"
   'NoneType' object is not iterable
   ```
   
   Moreover, I also noticed that using the `annotation-file` flag did nothing 
(the created action did not present the defined annotations, and `pydeploy` did 
not return any error).
   
   After analyzing the source code, I noticed that the `main` function was 
wrongly doing two verifications for the same flag:
   ```python
   if args.annotation is not None:
      composition['annotations'].extend([keyValue(a[0]) for a in 
args.annotation])
   
   if args.annotation is not None:
      composition['annotations'].extend([keyValueFromFile(a[0]) for a in 
args.annotation_file])
   ```
   
   The last verification is incorrect, as it should be done respecting the 
`annotation-file` flag. Therefore, when we only use the `annotation flag`, it 
will trigger both verifications and throw an error at the second one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to