From f96bef43cc41ec50977e527071296587cb8a9c32 Mon Sep 17 00:00:00 2001 From: Leo Koppelkamm Date: Tue, 11 Aug 2015 13:54:30 +0200 Subject: [PATCH] If no prefix is specified, set the path to '', otherwise boto won't list the files --- management/backup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/management/backup.py b/management/backup.py index 9101e28a..d7113799 100755 --- a/management/backup.py +++ b/management/backup.py @@ -329,6 +329,11 @@ def list_target_files(config): bucket = p.path[1:].split('/')[0] path = '/'.join(p.path[1:].split('/')[1:]) + '/' + + # If no prefix is specified, set the path to '', otherwise boto won't list the files + if path == '/': + path = '' + if bucket == "": raise ValueError("Enter an S3 bucket name.")