From 4e2ac2fecc1e30c2f9336de132596d2b28b0c8c9 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Wed, 30 May 2012 14:04:56 -0500 Subject: use die instead of print "blah blah\n" and exit 1, which was really dumb --- sboconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sboconfig') diff --git a/sboconfig b/sboconfig index b3260d3..83fdcea 100755 --- a/sboconfig +++ b/sboconfig @@ -74,8 +74,7 @@ while (my ($key, $value) = each %valid_confs) { } if (exists $changes{JOBS}) { unless ($changes{JOBS} =~ /^\d+$/ || $changes{JOBS} eq 'FALSE') { - print "You have provided an invalid parameter for -j\n"; - exit 1; + die "You have provided an invalid parameter for -j\n"; } } @@ -89,7 +88,7 @@ sub config_write { my ($key, $val) = @_; if (! -d $conf_dir) { mkdir ($conf_dir) - or print "Unable to create $conf_dir. Exiting.\n" and exit (1); + or die "Unable to create $conf_dir. Exiting.\n"; } if (-f $conf_file) { # get a temp file and fill it with the contents of our config file -- cgit v1.2.3