no more python2 support

This commit is contained in:
2020-08-17 13:01:42 +03:00
parent 60acba2225
commit 2f0fd26db0
7 changed files with 30 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import argparse, sys, os, subprocess, time, re, json
from subprocess import call, Popen, PIPE, STDOUT
import readline
@@ -110,7 +110,7 @@ def download_file(file, opts, filename = False):
for char in iter(lambda: p.stderr.read(1), ''):
if not char:
return
sys.stderr.write(char)
sys.stderr.write(char.decode())
sys.stderr.flush()
return
@@ -310,7 +310,7 @@ def print_title(title):
opts.share,
opts.rooturl
)
pad = " "*((len(status) - len(title))/2)
pad = " "*(int((len(status) - len(title))/2))
print("\n".join((
"",
"="*len(status),
@@ -324,7 +324,7 @@ def read_output(stream):
for char in iter(lambda: stream.read(1), ''):
if not char:
break
sys.stderr.write(char)
sys.stderr.write(char.decode())
sys.stderr.flush()
stream.close()