[
https://issues.apache.org/jira/browse/CLOUDSTACK-10294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365517#comment-16365517
]
ASF subversion and git services commented on CLOUDSTACK-10294:
--------------------------------------------------------------
Commit 6233a77d15adde86302a11b2bcda604313833e91 in cloudstack's branch
refs/heads/master from [~widodh]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=6233a77 ]
CLOUDSTACK-10294: PEP-8 fixes and enhancements to security_group.py (#2432)
- We should return a boolean and not a String 'true' or 'false'. Although this
output is never checked by the calling function(s).
- Do not use == False or == None as that is not according to the Python specs.
- Calling just print 'hello' is deprecated and won't work in newer Python
versions. We should use the print() function.
- Remove unused and commented function.
- Use logging.warning() instead of logging.warn()
- Use subprocess.check_output() for execution. This is the Python way of
executing commands.
Signed-off-by: Wido den Hollander <[email protected]>
> Updated code-styling and improvements to security_group.py
> ----------------------------------------------------------
>
> Key: CLOUDSTACK-10294
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10294
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: KVM
> Affects Versions: Future
> Reporter: Wido den Hollander
> Priority: Major
> Fix For: Future
>
>
> The security_group.py script hasn't gotten much attention (love) in the last
> few years and can use some PEP-8 fixes in addition to Unit Tests and other
> code improvements.
>
> This issue is a placeholder for all those improvements.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)