Skip to content

Commit

Permalink
Fix issue #125
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuluPro committed Oct 30, 2015
1 parent 7d9ddf7 commit d9dec42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dbbackup/settings.py
Expand Up @@ -93,11 +93,12 @@
('IS_SECURE', 'use_ssl'),
('SERVER_SIDE_ENCRYPTION', 'encryption'),
)
if hasattr(settings, 'DBBACKUP_S3_BUCKET'): # pragma: no cover
if hasattr(settings, 'DBBACKUP_S3_BUCKET'):
for old_suffix, new_key in DEPRECATED_AWS_SETTINGS:
if hasattr(settings, 'DBBACKUP_S3_%s' % old_suffix):
STORAGE_OPTIONS[new_key] = getattr(settings, old_suffix)
msg = "DBBACKUP_S3_%s is deprecated, use DBBACKUP_STORAGE_OPTIONS['%s']" % (old_suffix, new_key)
old_key = 'DBBACKUP_S3_%s' % old_suffix
if hasattr(settings, old_key):
STORAGE_OPTIONS[new_key] = getattr(settings, old_key)
msg = "%s is deprecated, use DBBACKUP_STORAGE_OPTIONS['%s']" % (old_key, new_key)
warnings.warn(msg, DeprecationWarning)
for old_suffix in UNSED_AWS_SETTINGS:
if hasattr(settings, 'DBBACKUP_S3_%s' % old_suffix):
Expand Down

0 comments on commit d9dec42

Please sign in to comment.