lib/kindlestrip.rb in narou-1.7.2 vs lib/kindlestrip.rb in narou-2.0.0
- old
+ new
@@ -229,11 +229,11 @@
puts "Strips the Sources record from Mobipocket ebooks"
puts "For ebooks generated using KindleGen 1.1 and later that add the source"
puts "Usage:"
puts " %s <infile> <outfile> <strippeddatafile>" % File.basename(__FILE__)
puts "<strippeddatafile> is optional."
- exit 1
+ exit Narou::EXIT_ERROR_CODE
else
infile = ARGV[0]
outfile = ARGV[1]
begin
stripped_file = SectionStripper.strip(infile, outfile)
@@ -241,9 +241,9 @@
if ARGV.length == 3
File.binwrite(ARGV[2], stripped_file.get_stripped_data)
end
rescue StripException => e
warn "Error: #{e.message}"
- exit 1
+ exit Narou::EXIT_ERROR_CODE
end
end
end