[Kimchi-devel] [PATCH] [Kimchi] Fix pep8 1.6.2 error W503 in model/vms.py

Paulo Vital pvital at linux.vnet.ibm.com
Wed Mar 2 11:35:17 UTC 2016



Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On 03/01/2016 05:58 PM, dhbarboza82 at gmail.com wrote:
> From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
> 
> This patch fixes the following pep8 error in make check-local:
> 
> $ make check-local
> contrib/check_i18n.py ./i18n.py
> Checking for invalid i18n string...
> Checking for invalid i18n string successfully
> /bin/pep8 --version
> 1.6.2
> /bin/pep8 --filename '*.py,*.py.in' --exclude="*config.py,*i18n.py,*tests/test_config.py" .
> ./model/vms.py:842:36: W503 line break before binary operator
> Makefile:1036: recipe for target 'check-local' failed
> make: *** [check-local] Error 1
> 
> Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
> ---
>  model/vms.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/model/vms.py b/model/vms.py
> index 8c3d4c4..195c879 100644
> --- a/model/vms.py
> +++ b/model/vms.py
> @@ -838,8 +838,10 @@ class VMModel(object):
>                  for dev in memDevs:
>                      if int(dev.xpath('./address/@slot')[0]) > devsRemove:
>                          root.find('./devices').remove(dev)
> -                newMem = newMem - (len(root.findall('./devices/memory'))
> -                                   * 1024 << 10)
> +                newMem = \
> +                    newMem - (
> +                        len(root.findall('./devices/memory')) * 1024 << 10
> +                    )
>              elif newMem == (oldMem << 10):
>                  newMem = newMem - ((len(memDevs) * 1024) << 10)
> 




More information about the Kimchi-devel mailing list