summaryrefslogtreecommitdiff
path: root/swiftclient/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/service.py')
-rw-r--r--swiftclient/service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/swiftclient/service.py b/swiftclient/service.py
index dddb7db..df1ffb3 100644
--- a/swiftclient/service.py
+++ b/swiftclient/service.py
@@ -1012,7 +1012,8 @@ class SwiftService(object):
try:
no_file = options['no_download']
content_type = headers.get('content-type')
- if content_type.split(';', 1)[0] == 'text/directory':
+ if (content_type and
+ content_type.split(';', 1)[0] == 'text/directory'):
make_dir = not no_file and out_file != "-"
if make_dir and not isdir(path):
mkdirs(path)