[Kimchi-devel] [PATCH V4 6/6] Fix PEP8 minor issues in multiple files

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Wed Apr 2 19:15:47 UTC 2014


After add new files to pep8 whitelist and run make check-local, found
that some files still have minor pep8 issues, probably inserted during
latest development months. This patch fixes these problems in :
	kimchi/control/host.py
	src/kimchi/model/storagepools.py
	src/kimchi/model/storagevolumes.py
	src/kimchi/model/vms.py

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 src/kimchi/control/host.py         | 1 +
 src/kimchi/model/storagepools.py   | 1 +
 src/kimchi/model/storagevolumes.py | 4 ++--
 src/kimchi/model/vms.py            | 9 +++++----
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/kimchi/control/host.py b/src/kimchi/control/host.py
index ee9fe7b..a0818c7 100644
--- a/src/kimchi/control/host.py
+++ b/src/kimchi/control/host.py
@@ -71,6 +71,7 @@ class Partitions(Collection):
         res_list.sort(key=lambda x: x.info['path'])
         return res_list
 
+
 class Partition(Resource):
     def __init__(self, model, id):
         super(Partition, self).__init__(model, id)
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index 9badb8f..5af33b7 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -165,6 +165,7 @@ class StoragePoolsModel(object):
         except Exception as e:
             raise OperationFailed('KCHPOOL0037E', {'err': e.message})
 
+
 class StoragePoolModel(object):
     def __init__(self, **kargs):
         self.conn = kargs['conn']
diff --git a/src/kimchi/model/storagevolumes.py b/src/kimchi/model/storagevolumes.py
index 6a91c86..c524ca3 100644
--- a/src/kimchi/model/storagevolumes.py
+++ b/src/kimchi/model/storagevolumes.py
@@ -140,12 +140,12 @@ class StorageVolumeModel(object):
                             if path == d_info['path']:
                                 ref_cnt = ref_cnt + 1
                     session.store('storagevolume', vol_id,
-                                 {'ref_cnt': ref_cnt})
+                                  {'ref_cnt': ref_cnt})
         except Exception as e:
             # This exception is going to catch errors returned by 'with',
             # specially ones generated by 'session.store'. It is outside
             # to avoid conflict with the __exit__ function of 'with'
-            raise OperationFailed('KCHVOL0017E',{'err': e.message})
+            raise OperationFailed('KCHVOL0017E', {'err': e.message})
 
         return ref_cnt
 
diff --git a/src/kimchi/model/vms.py b/src/kimchi/model/vms.py
index 12e780b..694b8aa 100644
--- a/src/kimchi/model/vms.py
+++ b/src/kimchi/model/vms.py
@@ -187,7 +187,7 @@ class VMsModel(object):
                 # It is possible to continue Kimchi executions without store
                 # vm icon info
                 kimchi_log.error('Error trying to update database with guest '
-                    'icon information due error: %s', e.message)
+                                 'icon information due error: %s', e.message)
 
         # If storagepool is SCSI, volumes will be LUNs and must be passed by
         # the user from UI or manually.
@@ -426,7 +426,8 @@ class VMModel(object):
             # It is possible to continue Kimchi executions without delete
             # screenshots
             kimchi_log.error('Error trying to delete vm screenshot from '
-                'database due error: %s', e.message)
+                             'database due error: %s', e.message)
+
 
 class VMScreenshotModel(object):
     def __init__(self, **kargs):
@@ -450,7 +451,7 @@ class VMScreenshotModel(object):
             # It is possible to continue Kimchi executions without store
             # screenshots
             kimchi_log.error('Error trying to update database with guest '
-                'screenshot information due error: %s', e.message)
+                             'screenshot information due error: %s', e.message)
         return img_path
 
     @staticmethod
@@ -468,7 +469,7 @@ class VMScreenshotModel(object):
             # It is possible to continue Kimchi vm executions without
             # screenshots
             kimchi_log.error('Error trying to update database with guest '
-                'screenshot information due error: %s', e.message)
+                             'screenshot information due error: %s', e.message)
         return LibvirtVMScreenshot(params, conn)
 
 
-- 
1.8.5.3




More information about the Kimchi-devel mailing list