david / biologeek (http://biologeek.com/)

Source code of biologeek.com weblog under WTFPL.

Clone this repository (size: 252.7 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/biologeek

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
        if splitted_url.scheme not in ('ftp', 'aftp'):
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.hostname == '':
49
        if splitted_url[1] == '':
49
50
            raise ImproperlyConfigured('You must at least provide hostname!')
50
51
            
51
52
        if splitted_url.scheme == 'aftp':