BaseTools/Source/Python/Trim/Trim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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]
-=-=-=-=-=-=-=-=-=-=-=-
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] -=-=-=-=-=-=-=-=-=-=-=-
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] -=-=-=-=-=-=-=-=-=-=-=-
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] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.