On Mon, Oct 19, 2009 at 05:32:05PM +0100, Matthew Booth wrote:
I know we've done this in plenty of other places, but die() really isn't a very nice user interface. I would change both of these to:
if($mode) { print STDERR __"msg"; exit(1); }
Even better, create an error reporting function which also prepends 'virt-tar: ' so this string doesn't show up repeatedly for translation.
Hmmmm I like die. It also shows people where the error happened which I think is an advantage (but without the verbosity of Python stack traces).
+Getopt::Long::Configure ("bundling"); +GetOptions ("help|?" => \$help, + "version" => \$version, + "connect|c=s" => \$uri, + "extract|download|x" => \&set_mode_x, + "upload|u" => \&set_mode_u, + "gzip|z" => \$gzip, + ) or pod2usage (2);
Mixed tabs and spaces.
Fixed these in the upcoming patch.
+die __"multiboot operating systems are not supported by virt-edit" if @roots> 1;
It's virt-tar, not virt-edit ;)
And fixed this one. New patch attached. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top