[Kimchi-devel] [PATCH] Fix multiple pep8

Christy Perez christy at linux.vnet.ibm.com
Mon Mar 17 15:58:50 UTC 2014


Reviewed-By: Christy Perez <christy at linux.vnet.ibm.com>


On Fri, 2014-03-14 at 11:22 +0800, lvroyce at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
> 
> Make check fails with pep8 version  1.3.3.
> Fix files revolve to comply with pep8.
> 
> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
> ---
>  src/kimchi/auth.py           | 2 +-
>  src/kimchi/model/networks.py | 2 +-
>  src/kimchi/osinfo.py         | 2 +-
>  src/kimchi/root.py           | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/kimchi/auth.py b/src/kimchi/auth.py
> index b042d73..501afb2 100644
> --- a/src/kimchi/auth.py
> +++ b/src/kimchi/auth.py
> @@ -136,7 +136,7 @@ def check_auth_session():
>          kimchiRobot = cherrypy.request.headers.get('Kimchi-Robot')
>          if kimchiRobot == "kimchi-robot":
>              if (time.time() - cherrypy.session[REFRESH] >
> -               cherrypy.session.timeout * 60):
> +                    cherrypy.session.timeout * 60):
>                  cherrypy.session[USER_ID] = None
>                  cherrypy.lib.sessions.expire()
>                  raise cherrypy.HTTPError(401)
> diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
> index 0242156..b7096e5 100644
> --- a/src/kimchi/model/networks.py
> +++ b/src/kimchi/model/networks.py
> @@ -64,7 +64,7 @@ class NetworksModel(object):
>                  # FIXME we can not distinguish this error from other internal
>                  # error by error code.
>                  if ("network is already in use by interface"
> -                   in e.message.lower()):
> +                        in e.message.lower()):
>                      # libvirt do not support update IP element, so delete the
>                      # the network and create new one.
>                      net.undefine()
> diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
> index 02dbabf..c5f889b 100644
> --- a/src/kimchi/osinfo.py
> +++ b/src/kimchi/osinfo.py
> @@ -113,7 +113,7 @@ def lookup(distro, version):
> 
>      if distro in modern_version_bases[arch]:
>          if LooseVersion(version) >= LooseVersion(
> -           modern_version_bases[arch][distro]):
> +                modern_version_bases[arch][distro]):
>              params.update(template_specs[arch]['modern'])
>          else:
>              params.update(template_specs[arch]['old'])
> diff --git a/src/kimchi/root.py b/src/kimchi/root.py
> index 5bad9b4..9bae34a 100644
> --- a/src/kimchi/root.py
> +++ b/src/kimchi/root.py
> @@ -51,7 +51,7 @@ class Root(Resource):
>          data = {'code': status, 'reason': message}
>          res = template.render('error.html', data)
>          if (type(res) is unicode and
> -           LooseVersion(cherrypy.__version__) < LooseVersion('3.2.5')):
> +                LooseVersion(cherrypy.__version__) < LooseVersion('3.2.5')):
>              res = res.encode("utf-8")
>          return res
> 
> @@ -60,7 +60,7 @@ class Root(Resource):
>                  'call_stack': cherrypy._cperror.format_exc()}
>          res = template.render('error.html', data)
>          if (type(res) is unicode and
> -           LooseVersion(cherrypy.__version__) < LooseVersion('3.2.5')):
> +                LooseVersion(cherrypy.__version__) < LooseVersion('3.2.5')):
>              res = res.encode("utf-8")
>          return res
> 





More information about the Kimchi-devel mailing list