Small fixes for Python 3

This commit is contained in:
derv82
2018-08-23 08:31:57 -07:00
parent d6c1c8d82e
commit aac6740fc1
2 changed files with 3 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ class Process(object):
def stdin(self, text):
if self.pid.stdin:
self.pid.stdin.write(text)
self.pid.stdin.write(text.encode('utf-8'))
self.pid.stdin.flush()
def get_output(self):

View File

@@ -28,8 +28,8 @@ class Timer(object):
return '-%ds' % seconds
rem = int(seconds)
hours = rem / 3600
mins = (rem % 3600) / 60
hours = int(rem / 3600)
mins = int((rem % 3600) / 60)
secs = rem % 60
if hours > 0:
return '%dh%dm%ds' % (hours, mins, secs)