#\r
# Return a PCD value of the form '{0x01, 0x02, ...}' along with the PCD length in bytes\r
#\r
- PcdValue = '{' + ', '.join (['0x{Byte:02X}'.format (Byte = Item) for Item in Buffer]) + '}'\r
- return PcdValue.encode (), len (Buffer)\r
+ return '{' + (', '.join (['0x{Byte:02X}'.format (Byte = Item) for Item in Buffer])) + '}', len (Buffer)\r
\r
#\r
# Create command line argument parser object\r
conflict_handler = 'resolve')\r
parser.add_argument ("-i", "--input", dest = 'InputFile', type = argparse.FileType ('rb'), action='append', required = True,\r
help = "Input binary filename. Multiple input files are combined into a single PCD.")\r
- parser.add_argument ("-o", "--output", dest = 'OutputFile', type = argparse.FileType ('wb'),\r
+ parser.add_argument ("-o", "--output", dest = 'OutputFile', type = argparse.FileType ('w'),\r
help = "Output filename for PCD value or PCD statement")\r
parser.add_argument ("-p", "--pcd", dest = 'PcdName', type = ValidatePcdName,\r
help = "Name of the PCD in the form <PcdTokenSpaceGuidCName>.<PcdCName>")\r