# Output an entry to a single file, as a special case
if output_fname:
if not entry_paths:
- raise ValueError('Must specify an entry path to write with -o')
+ raise ValueError('Must specify an entry path to write with -f')
if len(entry_paths) != 1:
- raise ValueError('Must specify exactly one entry path to write with -o')
+ raise ValueError('Must specify exactly one entry path to write with -f')
entry = image.FindEntryPath(entry_paths[0])
data = entry.ReadData(decomp)
tools.WriteFile(output_fname, data)
image_fname = tools.GetOutputFilename('image.bin')
with self.assertRaises(ValueError) as e:
control.ExtractEntries(image_fname, 'fname', None, [])
- self.assertIn('Must specify an entry path to write with -o',
+ self.assertIn('Must specify an entry path to write with -f',
str(e.exception))
def testExtractTooManyEntryPaths(self):
image_fname = tools.GetOutputFilename('image.bin')
with self.assertRaises(ValueError) as e:
control.ExtractEntries(image_fname, 'fname', None, ['a', 'b'])
- self.assertIn('Must specify exactly one entry path to write with -o',
+ self.assertIn('Must specify exactly one entry path to write with -f',
str(e.exception))
def testPackAlignSection(self):