You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Radoslaw Smigielski <ra...@eu.citrix.com> on 2013/02/25 16:15:29 UTC

Review Request: security_group.py checks the args length, doesn't throw IndexError when no args passed. Also logs to security_group.log when unknown command passed.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9588/
-----------------------------------------------------------

Review request for cloudstack.


Description
-------

- security_group.py executed doesn't check if executed with any args and fails with "IndexError: list index out of range" when no args are passed. 
- security_group.py logs to /var/log/cloud/security_group.log when called with no args
- security_group.py logs to /var/log/cloud/security_group.log when called with unknown command 

This is mostly cosmetic patch.


Diffs
-----

  scripts/vm/network/security_group.py dcb01a7 

Diff: https://reviews.apache.org/r/9588/diff/


Testing
-------

Tested on 3.0.6 and 4.1.


Thanks,

Radoslaw Smigielski


Re: Review Request: security_group.py checks the args length, doesn't throw IndexError when no args passed. Also logs to security_group.log when unknown command passed.

Posted by Rohit Yadav <bh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9588/#review17084
-----------------------------------------------------------

Ship it!


Fixed exit to sys.exit()... exit() is for interactive shell, user programs should always use sys.exit(num), this way this num is passed to the shell where someone can query exit status of last process via $?
Applied on master and 4.1:
4.1: 49402d566a3dc7d5a652e124c8ce0a0c078000b7
master: 0383803188eacbf948dc84de1710522e659b1790

Thanks for your patch.

- Rohit Yadav


On Feb. 25, 2013, 3:15 p.m., Radoslaw Smigielski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9588/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2013, 3:15 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> - security_group.py executed doesn't check if executed with any args and fails with "IndexError: list index out of range" when no args are passed. 
> - security_group.py logs to /var/log/cloud/security_group.log when called with no args
> - security_group.py logs to /var/log/cloud/security_group.log when called with unknown command 
> 
> This is mostly cosmetic patch.
> 
> 
> Diffs
> -----
> 
>   scripts/vm/network/security_group.py dcb01a7 
> 
> Diff: https://reviews.apache.org/r/9588/diff/
> 
> 
> Testing
> -------
> 
> Tested on 3.0.6 and 4.1.
> 
> 
> Thanks,
> 
> Radoslaw Smigielski
> 
>