hide cursor
This commit is contained in:
parent
0b22ea5604
commit
c88ab58f28
1 changed files with 10 additions and 1 deletions
|
@ -104,6 +104,13 @@ def ignore_file(client, path):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def hide_cursor():
|
||||||
|
sys.stdout.write("\033[?25l")
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
def show_cursor():
|
||||||
|
sys.stdout.write("\033[?25h")
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
class Client(object):
|
class Client(object):
|
||||||
_configfile = None
|
_configfile = None
|
||||||
|
@ -636,7 +643,7 @@ class Client(object):
|
||||||
for oshash in data:
|
for oshash in data:
|
||||||
data = {}
|
data = {}
|
||||||
info = self.info(oshash)
|
info = self.info(oshash)
|
||||||
if not 'error' in info:
|
if info and not 'error' in info:
|
||||||
for path in self.path(oshash):
|
for path in self.path(oshash):
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
if not self.api.uploadVideo(path,
|
if not self.api.uploadVideo(path,
|
||||||
|
@ -826,6 +833,7 @@ class API(ox.API):
|
||||||
data = self._json_request(url, form)
|
data = self._json_request(url, form)
|
||||||
|
|
||||||
print filename
|
print filename
|
||||||
|
hide_cursor()
|
||||||
result_url = data.get('url')
|
result_url = data.get('url')
|
||||||
if 'uploadUrl' in data:
|
if 'uploadUrl' in data:
|
||||||
uploadUrl = data['uploadUrl']
|
uploadUrl = data['uploadUrl']
|
||||||
|
@ -897,6 +905,7 @@ class API(ox.API):
|
||||||
else:
|
else:
|
||||||
print ' ' * 80
|
print ' ' * 80
|
||||||
print ''
|
print ''
|
||||||
|
show_cursor()
|
||||||
return data and 'result' in data and data.get('result') == 1
|
return data and 'result' in data and data.get('result') == 1
|
||||||
else:
|
else:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
|
Loading…
Reference in a new issue