Skip to content

Commit 4f47562

Browse files
committed
Fix Py3 and removed useless notices
1 parent a443462 commit 4f47562

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cyaron/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def __init__(self, *args, **kwargs):
5757
self.input_file = open(self.input_filename, 'w+')
5858
self.output_file = open(self.output_filename, 'w+') if self.output_filename else None
5959
self.is_first_char = dict()
60-
print("Processing %s" % self.input_filename)
60+
if self.file_flag != 0:
61+
print("Processing %s" % self.input_filename)
6162

6263
def __del__(self):
6364
"""__del__(self) -> None

cyaron/output_capture.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from contextlib import contextmanager
2-
from StringIO import StringIO
32
import sys
3+
try:
4+
from StringIO import StringIO
5+
except ImportError:
6+
from io import StringIO
47

58
@contextmanager
69
def captured_output():

0 commit comments

Comments
 (0)