Testing Done: |
|
---|
-
-
usr/src/tools/scripts/wsdiff.py (Diff revision 1) Did we set the locale to a utf-8 aware locale? This is true everywhere we're using utf-8 in this file.
Change Summary:
Drop explicit 'utf-8' encoding for input files.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+28 -35) |
-
-
usr/src/tools/scripts/wsdiff.py (Diff revision 2) If I am reading the documentation correctly,
subprocess.check_output()
would raise aCalledProcessError
exception in the event that the child process exited with a non-zero code. This new function,getoutput()
, appears to return the value (which is fine) but we then don't seem to check it here. Does that mean we won't hit theexcept:
block below where adiff
failure would otherwise be reported? -
usr/src/tools/scripts/wsdiff.py (Diff revision 2) So I think this should probably be a binary string, i.e.,
elfmagic = b'\177ELF'
, and then we should intead open the file in the binary mode:with io.open(f, mode='rb') as fd:
Otherwise it seems like we could get confused by possible locale and encoding issues by trying to treat the file as text instead of binary.
-
usr/src/tools/scripts/wsdiff.py (Diff revision 2) Should this call to
open()
actually beio.open()
as on L458? I'm a bit confused about the difference between them. -
usr/src/tools/scripts/wsdiff.py (Diff revision 2) Same question as above --
subprocess.check_output()
used to throw on non-zero exit, but we now seem to be silently ignoring therc
value here. -
usr/src/tools/scripts/wsdiff.py (Diff revision 2) Same question as above --
subprocess.check_output()
used to throw on non-zero exit, but we now seem to be silently ignoring therc
value here.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+37 -39) |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+39 -41) |