aboutsummaryrefslogtreecommitdiffstats
path: root/bin/open311-populate-service-list
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-10-04 10:12:19 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-10-04 10:12:19 +0100
commitaa83d4960f30abb98c7639de69bed11253aed7dc (patch)
treedfb03600c3d8c499f48eec7624299f7c73589094 /bin/open311-populate-service-list
parent14b4877ce5f2f69fb91da9cd16dfe234605680b3 (diff)
Add warning option to Open311 populate, to show warnings.
Diffstat (limited to 'bin/open311-populate-service-list')
-rwxr-xr-xbin/open311-populate-service-list6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list
index 99f8502a7..392b86dbd 100755
--- a/bin/open311-populate-service-list
+++ b/bin/open311-populate-service-list
@@ -9,6 +9,7 @@ use Getopt::Long::Descriptive;
my ($opt, $usage) = describe_options(
'%c %o',
['verbose|v', "print out all services as they are found"],
+ ['warn|w', "output warnings about any issues"],
['help', "print usage message and exit" ],
);
print($usage->text), exit if $opt->help;
@@ -16,6 +17,9 @@ print($usage->text), exit if $opt->help;
my $council_list = FixMyStreet::App->model('DB::Open311conf')->search( {
send_method => 'Open311'
} );
-my $p = Open311::PopulateServiceList->new( council_list => $council_list, verbose => $opt->verbose? 1:0 );
+my $verbose = 0;
+$verbose = 1 if $opt->warn;
+$verbose = 2 if $opt->verbose;
+my $p = Open311::PopulateServiceList->new( council_list => $council_list, verbose => $verbose );
$p->process_councils;