[edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py

Bob Feng posted 1 patch 4 years, 8 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/Trim/Trim.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
Posted by Bob Feng 4 years, 8 months ago
This is a regression issue introduced
by commit 307e1650be267b67db7be1089e0979ace460d83

This patch is to fix this issue.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
---
 BaseTools/Source/Python/Trim/Trim.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index 8767b67f7e..24c3fafa76 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -73,11 +73,11 @@ def TrimPreprocessedFile(Source, Target, ConvertHex, TrimLong):
     try:
         with open(Source, "r") as File:
             Lines = File.readlines()
     except IOError:
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
-    expect:
+    except:
         EdkLogger.error("Trim", AUTOGEN_ERROR, "TrimPreprocessedFile: Error while processing file", File=Source)
 
     PreprocessedFile = ""
     InjectedFile = ""
     LineIndexOfOriginalFile = None
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44797): https://edk2.groups.io/g/devel/message/44797
Mute This Topic: https://groups.io/mt/32678944/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
Posted by Carsey, Jaben 4 years, 8 months ago
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

Thanks
-Jaben


> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Bob Feng
> Sent: Thursday, August 01, 2019 6:24 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C
> <bob.c.feng@intel.com>
> Subject: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
> 
> This is a regression issue introduced
> by commit 307e1650be267b67db7be1089e0979ace460d83
> 
> This patch is to fix this issue.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> ---
>  BaseTools/Source/Python/Trim/Trim.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/Trim/Trim.py
> b/BaseTools/Source/Python/Trim/Trim.py
> index 8767b67f7e..24c3fafa76 100644
> --- a/BaseTools/Source/Python/Trim/Trim.py
> +++ b/BaseTools/Source/Python/Trim/Trim.py
> @@ -73,11 +73,11 @@ def TrimPreprocessedFile(Source, Target,
> ConvertHex, TrimLong):
>      try:
>          with open(Source, "r") as File:
>              Lines = File.readlines()
>      except IOError:
>          EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
> -    expect:
> +    except:
>          EdkLogger.error("Trim", AUTOGEN_ERROR, "TrimPreprocessedFile: Error
> while processing file", File=Source)
> 
>      PreprocessedFile = ""
>      InjectedFile = ""
>      LineIndexOfOriginalFile = None
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44798): https://edk2.groups.io/g/devel/message/44798
Mute This Topic: https://groups.io/mt/32678944/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
Posted by Liming Gao 4 years, 8 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Carsey, Jaben
> Sent: Thursday, August 1, 2019 10:45 PM
> To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: RE: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
> 
> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> 
> Thanks
> -Jaben
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Bob Feng
> > Sent: Thursday, August 01, 2019 6:24 AM
> > To: devel@edk2.groups.io
> > Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C
> > <bob.c.feng@intel.com>
> > Subject: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
> >
> > This is a regression issue introduced
> > by commit 307e1650be267b67db7be1089e0979ace460d83
> >
> > This patch is to fix this issue.
> >
> > Cc: Liming Gao <liming.gao@intel.com>
> > Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> > ---
> >  BaseTools/Source/Python/Trim/Trim.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/BaseTools/Source/Python/Trim/Trim.py
> > b/BaseTools/Source/Python/Trim/Trim.py
> > index 8767b67f7e..24c3fafa76 100644
> > --- a/BaseTools/Source/Python/Trim/Trim.py
> > +++ b/BaseTools/Source/Python/Trim/Trim.py
> > @@ -73,11 +73,11 @@ def TrimPreprocessedFile(Source, Target,
> > ConvertHex, TrimLong):
> >      try:
> >          with open(Source, "r") as File:
> >              Lines = File.readlines()
> >      except IOError:
> >          EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
> > -    expect:
> > +    except:
> >          EdkLogger.error("Trim", AUTOGEN_ERROR, "TrimPreprocessedFile: Error
> > while processing file", File=Source)
> >
> >      PreprocessedFile = ""
> >      InjectedFile = ""
> >      LineIndexOfOriginalFile = None
> > --
> > 2.18.0.windows.1
> >
> >
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44801): https://edk2.groups.io/g/devel/message/44801
Mute This Topic: https://groups.io/mt/32678944/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch] BaseTools: Fixed a typo in Trim.py
Posted by Philippe Mathieu-Daudé 4 years, 8 months ago
On 8/1/19 3:23 PM, Bob Feng wrote:
> This is a regression issue introduced
> by commit 307e1650be267b67db7be1089e0979ace460d83
> 
> This patch is to fix this issue.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> ---
>  BaseTools/Source/Python/Trim/Trim.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
> index 8767b67f7e..24c3fafa76 100644
> --- a/BaseTools/Source/Python/Trim/Trim.py
> +++ b/BaseTools/Source/Python/Trim/Trim.py
> @@ -73,11 +73,11 @@ def TrimPreprocessedFile(Source, Target, ConvertHex, TrimLong):
>      try:
>          with open(Source, "r") as File:
>              Lines = File.readlines()
>      except IOError:
>          EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
> -    expect:
> +    except:
>          EdkLogger.error("Trim", AUTOGEN_ERROR, "TrimPreprocessedFile: Error while processing file", File=Source)
>  
>      PreprocessedFile = ""
>      InjectedFile = ""
>      LineIndexOfOriginalFile = None
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44800): https://edk2.groups.io/g/devel/message/44800
Mute This Topic: https://groups.io/mt/32678944/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-