You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ga...@apache.org on 2021/03/12 17:03:44 UTC

[cloudstack] 05/12: Fix indentation issues and use python3 when running pycodestyle checker

This is an automated email from the ASF dual-hosted git repository.

gabriel pushed a commit to branch python3-vr
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 4604d472ceaa4e10961f76bd3b917fb73a9223c0
Author: Gabriel Brascher <ga...@apache.org>
AuthorDate: Thu Feb 25 03:49:27 2021 -0300

    Fix indentation issues and use python3 when running pycodestyle checker
    
    Conflicts were found & fixed:
    
    	modified:   systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py
    	modified:   systemvm/debian/root/health_checks/router_version_check.py
    	modified:   systemvm/test/runtests.sh
---
 systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py            | 2 +-
 systemvm/debian/root/health_checks/router_version_check.py | 4 ++--
 systemvm/test/runtests.sh                                  | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py
index e39595d..1679970 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py
@@ -28,7 +28,7 @@ class CsChain(object):
         self.count = {}
 
     def add(self, table, chain):
-         if table not in list(self.chain.keys()):
+        if table not in list(self.chain.keys()):
             self.chain.setdefault(table, []).append(chain)
         else:
             self.chain[table].append(chain)
diff --git a/systemvm/debian/root/health_checks/router_version_check.py b/systemvm/debian/root/health_checks/router_version_check.py
index 3ab33fe..1ec37e9 100644
--- a/systemvm/debian/root/health_checks/router_version_check.py
+++ b/systemvm/debian/root/health_checks/router_version_check.py
@@ -68,8 +68,8 @@ def main():
             print("Scripts signature is not yet setup at " + sigFile +
                   ", skipping")
         if expected != found:
-            print("Scripts Version mismatch. Expected: " + expected +
-                  ", found: " + found)
+            print("Scripts Version mismatch. Expected: " +
+                  expected + ", found: " + found)
             scriptVersionMatches = False
 
     if templateVersionMatches and scriptVersionMatches:
diff --git a/systemvm/test/runtests.sh b/systemvm/test/runtests.sh
index 9646b54..3f113f5 100755
--- a/systemvm/test/runtests.sh
+++ b/systemvm/test/runtests.sh
@@ -22,8 +22,8 @@ export PYTHONPATH="../debian/opt/cloud/bin/"
 export PYTHONDONTWRITEBYTECODE=False
 
 echo "Running pycodestyle to check systemvm/python code for errors"
-pycodestyle --max-line-length=179 *py
-pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
+python3 -m pycodestyle --max-line-length=179 *py
+python3 -m pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
 if [ $? -gt 0 ]
 then
     echo "pycodestyle failed, please check your code"