Skip to content

Commit

Permalink
AWS requests now create empty folders in .SAFE structure
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksMat committed Jan 23, 2018
1 parent ecf8c1d commit 0da30eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sentinelhub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
from .time_utils import next_date, prev_date, get_current_date


__version__ = "1.0.1"
__version__ = "1.0.2"
7 changes: 4 additions & 3 deletions sentinelhub/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from .time_utils import parse_time
from .config import SGConfig
from .constants import AwsConstants, EsaSafeType, MimeType
from .os_utils import make_folder


LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -122,13 +123,13 @@ def structure_recursion(self, struct, folder):
From nested dictionaries representing .SAFE structure it recursively extracts all the files that need to be
downloaded and stores them into class attribute 'download_list'
:param struct:
:param struct: nested dictionaries representing a part of .SAFE structure
:type struct: dict
:param folder: name of folder where this structure will be saved
:type folder: str
"""
if not struct:
# This happens if the folder is empty. In current package version empty folder will not be created
if not struct: # This happens if the folder is empty.
make_folder(folder)
return
for name, substruct in struct.items():
subfolder = os.path.join(folder, name)
Expand Down

0 comments on commit 0da30eb

Please sign in to comment.