diff mbox

[U-Boot,v4,07/10] moveconfig: Output a list of failed boards

Message ID 1431726052-6519-7-git-send-email-joe.hershberger@ni.com
State Superseded
Delegated to: Masahiro Yamada
Headers show

Commit Message

Joe Hershberger May 15, 2015, 9:40 p.m. UTC
If boards fail, output that list to a file so that it can easily be
passed back into moveconfig.py using the -d option.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 tools/moveconfig.py | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Masahiro Yamada May 19, 2015, 3:12 a.m. UTC | #1
2015-05-16 6:40 GMT+09:00 Joe Hershberger <joe.hershberger@ni.com>:
> If boards fail, output that list to a file so that it can easily be
> passed back into moveconfig.py using the -d option.
>
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  tools/moveconfig.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/moveconfig.py b/tools/moveconfig.py
> index 15b0f2b..9e923da 100755
> --- a/tools/moveconfig.py
> +++ b/tools/moveconfig.py
> @@ -728,6 +728,10 @@ class Slots:
>              for line in msg:
>                  print >> sys.stderr, color_text(self.options.color,
>                                                  COLOR_LIGHT_RED, line)
> +            ffail = open('moveconfig.failed', 'w')
> +            for failed_board in failed_boards:
> +                ffail.write("%s\n" % failed_board)
> +            ffail.close()
>
>  def move_config(config_attrs, options):
>      """Move config options to defconfig files.


If you use with ... as ..., it will automatically close
the file on exit.

    with open('moveconfig.failed', 'w') as f:
    for board in failed_boards:
        f.write(board + '\n')
Joe Hershberger May 19, 2015, 3:40 p.m. UTC | #2
Hi Masahiro-san,

On Mon, May 18, 2015 at 10:12 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2015-05-16 6:40 GMT+09:00 Joe Hershberger <joe.hershberger@ni.com>:
>> If boards fail, output that list to a file so that it can easily be
>> passed back into moveconfig.py using the -d option.
>>
>> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
>> ---
>>
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
>>
>>  tools/moveconfig.py | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/moveconfig.py b/tools/moveconfig.py
>> index 15b0f2b..9e923da 100755
>> --- a/tools/moveconfig.py
>> +++ b/tools/moveconfig.py
>> @@ -728,6 +728,10 @@ class Slots:
>>              for line in msg:
>>                  print >> sys.stderr, color_text(self.options.color,
>>                                                  COLOR_LIGHT_RED, line)
>> +            ffail = open('moveconfig.failed', 'w')
>> +            for failed_board in failed_boards:
>> +                ffail.write("%s\n" % failed_board)
>> +            ffail.close()
>>
>>  def move_config(config_attrs, options):
>>      """Move config options to defconfig files.
>
>
> If you use with ... as ..., it will automatically close
> the file on exit.
>
>     with open('moveconfig.failed', 'w') as f:
>     for board in failed_boards:
>         f.write(board + '\n')

OK.

-Joe
diff mbox

Patch

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 15b0f2b..9e923da 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -728,6 +728,10 @@  class Slots:
             for line in msg:
                 print >> sys.stderr, color_text(self.options.color,
                                                 COLOR_LIGHT_RED, line)
+            ffail = open('moveconfig.failed', 'w')
+            for failed_board in failed_boards:
+                ffail.write("%s\n" % failed_board)
+            ffail.close()
 
 def move_config(config_attrs, options):
     """Move config options to defconfig files.