[interchange-cvs] interchange - racke modified lib/Vend/Config.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Feb 14 11:11:40 EST 2008
User: racke
Date: 2008-02-14 16:11:39 GMT
Modified: lib/Vend Config.pm
Log:
issue proper error message on missing default locale instead of the dreaded
"Please specify the Locale directive in the configuration file 'catalog.cfg'"
Revision Changes Path
2.231 +9 -4 interchange/lib/Vend/Config.pm
rev 2.231, prev_rev 2.230
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.230
retrieving revision 2.231
diff -u -r2.230 -r2.231
--- Config.pm 5 Feb 2008 16:44:51 -0000 2.230
+++ Config.pm 14 Feb 2008 16:11:39 -0000 2.231
@@ -1,8 +1,8 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.230 2008/02/05 16:44:51 kwalsh Exp $
+# $Id: Config.pm,v 2.231 2008/02/14 16:11:39 racke Exp $
#
-# Copyright (C) 2002-2007 Interchange Development Group
+# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
#
# This program was originally based on Vend 0.2 and 0.3
@@ -54,7 +54,7 @@
use Vend::Data;
use Vend::Cron;
-$VERSION = substr(q$Revision: 2.230 $, 10);
+$VERSION = substr(q$Revision: 2.231 $, 10);
my %CDname;
my %CPname;
@@ -3494,7 +3494,12 @@
or return 1;
if ($C->{DefaultLocale}) {
my $def = $C->{DefaultLocale};
- $C->{Locale} = $repos->{$def};
+ if (exists($repos->{$def})) {
+ $C->{Locale} = $repos->{$def};
+ }
+ else {
+ return (0, errmsg('Default locale %s missing', $def));
+ }
}
else {
for(keys %$repos) {
More information about the interchange-cvs
mailing list