Patchwork [bitbake-devel,1/1] bitbake: replace 3 spaces with 4

login
register
mail settings
Submitter Robert Yang
Date Dec. 27, 2013, 3:55 p.m.
Message ID <c26d7a72feb5c465b89cbc719e97afec4a5c0892.1388159725.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/63761/
State New
Headers show

Comments

Robert Yang - Dec. 27, 2013, 3:55 p.m.
A part of fetch2/__init__.py and yacc.py uses 3 spaces as the indent, I
think that they should be typos.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/__init__.py |  8 ++++----
 bitbake/lib/ply/yacc.py           | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)
Richard Purdie - Jan. 2, 2014, 1:06 p.m.
On Fri, 2013-12-27 at 23:55 +0800, Robert Yang wrote:
> A part of fetch2/__init__.py and yacc.py uses 3 spaces as the indent, I
> think that they should be typos.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  bitbake/lib/bb/fetch2/__init__.py |  8 ++++----
>  bitbake/lib/ply/yacc.py           | 12 ++++++------
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index 8fdf59c..439a44a 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1263,10 +1263,10 @@ class FetchMethod(object):
>          return
>  
>      def clean(self, urldata, d):
> -       """
> -       Clean any existing full or partial download
> -       """
> -       bb.utils.remove(urldata.localpath)
> +        """
> +        Clean any existing full or partial download
> +        """
> +        bb.utils.remove(urldata.localpath)
>  
>      def try_premirror(self, urldata, d):
>          """

The __init__ change is fine and I've taken it, the yacc code is actually
a copy from upstream so its better to leave that alone even if its not
entirely correct.

Cheers,

Richard

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 8fdf59c..439a44a 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1263,10 +1263,10 @@  class FetchMethod(object):
         return
 
     def clean(self, urldata, d):
-       """
-       Clean any existing full or partial download
-       """
-       bb.utils.remove(urldata.localpath)
+        """
+        Clean any existing full or partial download
+        """
+        bb.utils.remove(urldata.localpath)
 
     def try_premirror(self, urldata, d):
         """
diff --git a/bitbake/lib/ply/yacc.py b/bitbake/lib/ply/yacc.py
index 6168fd9..711987a 100644
--- a/bitbake/lib/ply/yacc.py
+++ b/bitbake/lib/ply/yacc.py
@@ -2589,9 +2589,9 @@  _lr_signature = %r
                 f.write("""
 _lr_action = { }
 for _k, _v in _lr_action_items.items():
-   for _x,_y in zip(_v[0],_v[1]):
-      if not _x in _lr_action:  _lr_action[_x] = { }
-      _lr_action[_x][_k] = _y
+    for _x,_y in zip(_v[0],_v[1]):
+        if not _x in _lr_action:  _lr_action[_x] = { }
+        _lr_action[_x][_k] = _y
 del _lr_action_items
 """)
 
@@ -2629,9 +2629,9 @@  del _lr_action_items
                 f.write("""
 _lr_goto = { }
 for _k, _v in _lr_goto_items.items():
-   for _x,_y in zip(_v[0],_v[1]):
-       if not _x in _lr_goto: _lr_goto[_x] = { }
-       _lr_goto[_x][_k] = _y
+    for _x,_y in zip(_v[0],_v[1]):
+        if not _x in _lr_goto: _lr_goto[_x] = { }
+        _lr_goto[_x][_k] = _y
 del _lr_goto_items
 """)
             else: