Skip to content

Commit

Permalink
Improve error in cloud clients when boto3 is missing
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
  • Loading branch information
mnencia committed Dec 2, 2019
1 parent 4ad833d commit 221e1a5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions barman/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@
from io import BytesIO
from tempfile import NamedTemporaryFile

import boto3
from botocore.exceptions import ClientError, EndpointConnectionError

from barman.backup_executor import ConcurrentBackupStrategy
from barman.fs import path_allowed
from barman.infofile import BackupInfo
from barman.postgres_plumbing import EXCLUDE_LIST, PGDATA_EXCLUDE_LIST
from barman.utils import force_str, human_readable_timedelta, total_seconds

try:
import boto3
from botocore.exceptions import ClientError, EndpointConnectionError
except ImportError:
raise SystemExit("Missing required python module: boto3")

try:
# Python 3.x
from urllib.parse import urlparse
Expand Down

0 comments on commit 221e1a5

Please sign in to comment.