Skip to content

Commit

Permalink
fixes PEP8, and update version 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tokibito committed Oct 1, 2015
1 parent a8fa3f7 commit a2fa94d
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ env:
- TOXENV=py27-dj15
- TOXENV=py27-dj16
- TOXENV=py27-dj17
- TOXENV=py27-dj18
- TOXENV=py33-dj16
- TOXENV=py34-dj16
- TOXENV=py34-dj17
- TOXENV=py34-dj18
- TOXENV=flake8
- TOXENV=coverage
script:
Expand Down
6 changes: 6 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Change History
==============

0.3.2
=====
:release-date: 2015-10-02

* #7 support Custom Authorizer and Handler classes via settings

0.3.1
=====
:release-date: 2015-03-29
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def read(filename):

setup(
name='django-ftpserver',
version='0.3.1',
version='0.3.2',
description="FTP server application for Django.",
long_description=read('README.rst'),
package_dir={'': 'src'},
Expand Down
2 changes: 1 addition & 1 deletion src/django_ftpserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.1'
__version__ = '0.3.2'
8 changes: 6 additions & 2 deletions src/django_ftpserver/management/commands/ftpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,17 @@ def handle(self, *args, **options):
# select handler class
if certfile or keyfile:
if hasattr(handlers, 'TLS_FTPHandler'):
handler_class = utils.get_settings_value('FTPSERVER_TLSHANDLER') or handlers.TLS_FTPHandler
handler_class = (
utils.get_settings_value('FTPSERVER_TLSHANDLER')
) or handlers.TLS_FTPHandler
else:
# unsupported
raise CommandError(
"Can't import OpenSSL. Please install pyOpenSSL.")
else:
handler_class = utils.get_settings_value('FTPSERVER_HANDLER') or handlers.FTPHandler
handler_class = (
utils.get_settings_value('FTPSERVER_HANDLER')
) or handlers.FTPHandler

authorizer_class = utils.get_settings_value('FTPSERVER_AUTHORIZER') \
or FTPAccountAuthorizer
Expand Down
1 change: 1 addition & 0 deletions src/django_ftpserver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def import_class(class_path):
module = import_module(module)
return getattr(module, cls)


def make_server(
server_class, handler_class, authorizer_class, host_port,
file_access_user=None, **handler_options):
Expand Down
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ envlist =
py27-dj15,
py27-dj16,
py27-dj17,
py27-dj18,
py33-dj16,
py34-dj16,
py34-dj17,
py34-dj18,
flake8

[testenv]
Expand Down Expand Up @@ -60,6 +62,12 @@ deps =
django>=1.7,<1.8
{[testenv]deps}

[testenv:py27-dj18]
basepython = python2.7
deps =
django>=1.8,<1.9
{[testenv]deps}

[testenv:py33-dj16]
basepython = python3.3
deps =
Expand All @@ -78,6 +86,12 @@ deps =
django>=1.7,<1.8
{[testenv]deps}

[testenv:py34-dj18]
basepython = python3.4
deps =
django>=1.8,<1.9
{[testenv]deps}

[testenv:flake8]
basepython = python2.7
deps =
Expand Down

0 comments on commit a2fa94d

Please sign in to comment.