Skip to content

Commit

Permalink
using pathlib2 backport lib
Browse files Browse the repository at this point in the history
to avoid failure on python 2.7

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
  • Loading branch information
gsemet committed Jun 4, 2017
1 parent f9b21d8 commit 30cb13c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ python:
install:
- sudo ./bootstrap.sh
- ./install.sh system-dev
- pip install pytest-cov
- sudo apt-get install -y libffi-dev libssl-dev
- pip install pytest-cov requests[security] # for pycov and removing InsecurePlatformWarning

script:
- ./check-style.sh bare
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ setuptools = "!=36.0.0"
subliminal = "*"
klein = "*"
glob2 = "*"
pathlib2 = "*"
5 changes: 4 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion check-style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fi
${PIPENV_EXEC}python setup.py sdist
${PIPENV_EXEC}python setup.py flake8
echo "Running pylint"
${PIPENV_EXEC}pylint --rcfile=setup.cfg subdlsrv
${PIPENV_EXEC}pylint --rcfile=setup.cfg --output-format=colorized subdlsrv
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ max-attributes=11
[isort]
line_length = 100
known_future_library = future
known_standard_library = pkg_resources,html
known_standard_library = pathlib2,glob2
known_twisted =
twisted,
klein
Expand Down
4 changes: 1 addition & 3 deletions subdlsrv/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
import logging
import tempfile
from logging.handlers import RotatingFileHandler
from pathlib import Path
from pathlib2 import Path

try:
import colorlog
except Exception:
colorlog = None

_inited = False


def temp_dir(name, root=None):
root = root or tempfile.gettempdir()
Expand Down

0 comments on commit 30cb13c

Please sign in to comment.