diff options
author | Eric Wong <e@yhbt.net> | 2020-01-26 01:17:42 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-27 02:58:06 +0000 |
commit | 227a1d886672767e37cc86a3432952c14eb8a143 (patch) | |
tree | dd4890655f88583a16952c751cf9f4e9e731d224 /script/public-inbox-convert | |
parent | fcfa0d639da338c470f07942da71f78fa65354a1 (diff) | |
download | public-inbox-227a1d886672767e37cc86a3432952c14eb8a143.tar.gz |
inbox: add ->version method
This allows us to simplify version checking by avoiding "//" or "||" operators sprinkled around.
Diffstat (limited to 'script/public-inbox-convert')
-rwxr-xr-x | script/public-inbox-convert | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/public-inbox-convert b/script/public-inbox-convert index 633c4cf8..56a810eb 100755 --- a/script/public-inbox-convert +++ b/script/public-inbox-convert @@ -41,7 +41,7 @@ unless ($old) { $old = PublicInbox::Inbox->new($old); } $old = PublicInbox::InboxWritable->new($old); -if (($old->{version} || 1) >= 2) { +if ($old->version >= 2) { die "Only conversion from v1 inboxes is supported\n"; } my $new = { %$old }; |