Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Commit

Permalink
Made boto optional.
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Hudson <rob@tastybrew.com>
  • Loading branch information
brosner authored and Rob Hudson committed Apr 8, 2009
1 parent 8f595e7 commit 027a030
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dumpy/dumper.py
Expand Up @@ -4,8 +4,14 @@
import shutil
import tempfile

from boto.s3.key import Key
from boto.s3.connection import S3Connection
try:
import boto
except ImportError:
boto = None
else:
from boto.s3.key import Key
from boto.s3.connection import S3Connection


class MySQLDumpError(Exception):
pass
Expand Down Expand Up @@ -262,6 +268,9 @@ def parse_config(self):
self.bucket = self._get_option_value(self.config, 'S3Copy options', 'bucket')

def process(self, file):
if boto is None:
raise Exception("You must have boto installed before using S3 support.")

self.parse_config()

conn = S3Connection(self.access_key, self.secret_key)
Expand Down

0 comments on commit 027a030

Please sign in to comment.