Skip to content

Commit

Permalink
debug subprocess for python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
imankarimi committed Nov 11, 2021
1 parent 17237a1 commit 9845b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions log_reader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
# import re
import subprocess
from subprocess import PIPE
from fnmatch import fnmatch
from django.utils.translation import ugettext_lazy as _

Expand All @@ -26,8 +27,8 @@ def read_file_lines(file_name):
file_path = '%s/%s' % (settings.LOG_READER_DIR_PATH, file_name)
result = subprocess.run(
['tail', '-%s' % settings.LOG_READER_MAX_READ_LINES, file_path],
capture_output=True,
# text=True,
stdout=PIPE,
stderr=PIPE,
encoding="utf8",
)
content = repr(result.stdout) if result.stdout else None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-log-reader',
version='1.1.4',
version='1.1.5',
zip_safe=False,
packages=find_packages(),
include_package_data=True,
Expand Down

0 comments on commit 9845b53

Please sign in to comment.