Change in vdsm[master]: trivial: Some style fixes in API logging

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Thu Oct 25 03:24:23 UTC 2012


Mark Wu has uploaded a new change for review.

Change subject: trivial: Some style fixes in API logging
......................................................................

trivial: Some style fixes in API logging

1. Remove rebundant plus and trailing slash.
2. Add trailing space to avoid concatenating together.

Change-Id: I47e6ac04ca0bca2b02530ef60ba908714c7b45a4
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M vdsm/API.py
1 file changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/8801/1

diff --git a/vdsm/API.py b/vdsm/API.py
index bbc3221..c1d224e 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -176,8 +176,8 @@
                     self.log.error('Missing required parameter %s' % (param))
                     return {'status': {'code': errCode['MissParam']
                                                       ['status']['code'],
-                                       'message': 'Missing required' + \
-                                       'parameter %s' % (param)}}
+                                       'message': ('Missing required '
+                                                   'parameter %s' % (param))}}
             try:
                 storage.misc.validateUUID(vmParams['vmId'])
             except:
@@ -359,8 +359,8 @@
         except ValueError:
             self.log.error('Missing one of required parameters: vmId, nic')
             return {'status': {'code': errCode['MissParam']['status']['code'],
-                               'message': 'Missing one of required' + \
-                                          'parameters: vmId, nic'}}
+                               'message': ('Missing one of required '
+                                           'parameters: vmId, nic')}}
         try:
             curVm = self._cif.vmContainer[self._UUID]
         except KeyError:
@@ -375,8 +375,8 @@
         except ValueError:
             self.log.error('Missing one of required parameters: vmId, nic')
             return {'status': {'code': errCode['MissParam']['status']['code'],
-                               'message': 'Missing one of required' + \
-                                          'parameters: vmId, nic'}}
+                               'message': ('Missing one of required '
+                                           'parameters: vmId, nic')}}
         try:
             curVm = self._cif.vmContainer[self._UUID]
         except KeyError:
@@ -391,8 +391,8 @@
         except ValueError:
             self.log.error('Missing one of required parameters: vmId, drive')
             return {'status': {'code': errCode['MissParam']['status']['code'],
-                               'message': 'Missing one of required' + \
-                                          'parameters: vmId, drive'}}
+                               'message': ('Missing one of required '
+                                           'parameters: vmId, drive')}}
         try:
             curVm = self._cif.vmContainer[self._UUID]
         except KeyError:
@@ -407,8 +407,8 @@
         except ValueError:
             self.log.error('Missing one of required parameters: vmId, drive')
             return {'status': {'code': errCode['MissParam']['status']['code'],
-                               'message': 'Missing one of required' + \
-                                          'parameters: vmId, drive'}}
+                               'message': ('Missing one of required '
+                                           'parameters: vmId, drive')}}
         try:
             curVm = self._cif.vmContainer[self._UUID]
         except KeyError:
@@ -1120,7 +1120,7 @@
 
         Doesn't survive a restart
         """
-        logging.getLogger('clientIF.setLogLevel').info('Setting loglevel' + \
+        logging.getLogger('clientIF.setLogLevel').info('Setting loglevel '
                                                        'to %s' % level)
         handlers = logging.getLogger().handlers
         [fileHandler] = [h for h in handlers if
@@ -1205,7 +1205,7 @@
 
             if vlan or bond or nics:
                 # Backwards compatibility
-                self.log.warn('Specifying vlan,' + \
+                self.log.warn('Specifying vlan, '
                               'bond or nics to delNetwork is deprecated')
                 _netinfo = netinfo.NetInfo()
                 try:
@@ -1215,7 +1215,7 @@
                         configNetwork.validateVlanId(vlan)
                     if nics and bond and set(nics) != \
                             set(_netinfo.bondings[bond]["slaves"]):
-                        self.log.error('delNetwork: not all nics specified' + \
+                        self.log.error('delNetwork: not all nics specified '
                                        'are enslaved (%s != %s)' %
                                        (nics,
                                         _netinfo.bondings[bond]["slaves"]))


--
To view, visit http://gerrit.ovirt.org/8801
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47e6ac04ca0bca2b02530ef60ba908714c7b45a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list