From 227a1d886672767e37cc86a3432952c14eb8a143 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 Jan 2020 01:17:42 +0000 Subject: inbox: add ->version method This allows us to simplify version checking by avoiding "//" or "||" operators sprinkled around. --- scripts/import_slrnspool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool index 1dccb8dd..b913cf32 100755 --- a/scripts/import_slrnspool +++ b/scripts/import_slrnspool @@ -26,7 +26,7 @@ my $config = PublicInbox::Config->new; my $ibx = $config->lookup($recipient); my $git = $ibx->git; my $im; -if (($ibx->{version} || 1) == 2) { +if ($ibx->version == 2) { require PublicInbox::V2Writable; $im = PublicInbox::V2Writable->new($ibx); $im->{parallel} = 0; # pointless to be parallel for a single message -- cgit v1.2.3-24-ge0c7