Skip to content

Commit 9845b53

Browse files
committed
debug subprocess for python 3.6
1 parent 17237a1 commit 9845b53

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

log_reader/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
# import re
55
import subprocess
6+
from subprocess import PIPE
67
from fnmatch import fnmatch
78
from django.utils.translation import ugettext_lazy as _
89

@@ -26,8 +27,8 @@ def read_file_lines(file_name):
2627
file_path = '%s/%s' % (settings.LOG_READER_DIR_PATH, file_name)
2728
result = subprocess.run(
2829
['tail', '-%s' % settings.LOG_READER_MAX_READ_LINES, file_path],
29-
capture_output=True,
30-
# text=True,
30+
stdout=PIPE,
31+
stderr=PIPE,
3132
encoding="utf8",
3233
)
3334
content = repr(result.stdout) if result.stdout else None

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name='django-log-reader',
12-
version='1.1.4',
12+
version='1.1.5',
1313
zip_safe=False,
1414
packages=find_packages(),
1515
include_package_data=True,

0 commit comments

Comments
 (0)