no more python2 support
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user