| commit 64: | 9eac043c46c6 |
| parent 63: | f8996269702d |
| branch: | default |
ParseResult hasn't scheme/hostname attributes with old versions
19 months ago
Changed (Δ64 bytes):
raw changeset »
biologeek/storages.py (3 lines added, 2 lines removed)
Up to file-list biologeek/storages.py:
| … | … | @@ -43,9 +43,10 @@ class FTPStorage(Storage): |
43 |
43 |
splitted_url = urlparse.urlparse(location) |
44 |
44 |
config = {} |
45 |
45 |
|
46 |
|
|
46 |
# ParseResult hasn't scheme/hostname attributes with old versions |
|
47 |
if splitted_url[0] not in ('ftp', 'aftp'): |
|
47 |
48 |
raise ImproperlyConfigured('FTPStorage works only with FTP protocol!') |
48 |
if splitted_url |
|
49 |
if splitted_url[1] == '': |
|
49 |
50 |
raise ImproperlyConfigured('You must at least provide hostname!') |
50 |
51 |
|
51 |
52 |
if splitted_url.scheme == 'aftp': |
