Skip to content

Commit 7beea39

Browse files
committed
1 parent 6614821 commit 7beea39

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

trunk/nuv_export/cli.pm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,12 @@ package nuv_export::cli;
146146
# Get the options
147147
GetOptions(\%args, @args)
148148
or die "Invalid commandline parameter(s).\n";
149-
# Make sure nice is defined
150-
if (defined($args{'nice'})) {
151-
die "--nice must be between -20 (highest priority) and 19 (lowest)\n" if (int($args{'nice'}) != $args{'nice'} || $args{'nice'} > 19 || $args{'nice'} < -20);
152-
$NICE .= ' -n'.int($args{'nice'});
153-
}
154-
else {
155-
$NICE .= ' -n19';
149+
# Make sure $NICE is defined
150+
$args{'nice'} = arg('nice', 19);
151+
if (int($args{'nice'}) != $args{'nice'} || $args{'nice'} > 19 || $args{'nice'} < -20) {
152+
die "--nice must be between -20 (highest priority) and 19 (lowest)\n";
156153
}
154+
$NICE .= ' -n'.int($args{'nice'});
157155
# Is this a commandline-only request?
158156
if (!$args{'confirm'} && ($args{'title'} || $args{'subtitle'} || $args{'description'} || $args{'infile'} || $args{'starttime'} || $args{'chanid'})) {
159157
$is_cli = 1;

0 commit comments

Comments
 (0)