summaryrefslogtreecommitdiffstats
path: root/pyLoadCli.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-18 00:06:18 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-18 00:06:18 +0200
commit5c1fb051fcbc7842bb4f6e879684cda9d7a14cdb (patch)
tree44fccf0954de54947397bfac76633d9f0e6c48a6 /pyLoadCli.py
parentimprovements, command line link checker (diff)
downloadpyload-5c1fb051fcbc7842bb4f6e879684cda9d7a14cdb.tar.xz
closed #364, changes to online check api
Diffstat (limited to 'pyLoadCli.py')
-rwxr-xr-xpyLoadCli.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/pyLoadCli.py b/pyLoadCli.py
index a59832c73..9760c08b7 100755
--- a/pyLoadCli.py
+++ b/pyLoadCli.py
@@ -326,19 +326,18 @@ class Cli:
print _("Checking %d links:") % len(links)
print
- rid = client.checkOnlineStatus(links)
+ rid = client.checkOnlineStatus(links).rid
while True:
sleep(1)
result = client.pollResults(rid)
- for pack in result.itervalues():
- for url, status in pack.iteritems():
- if status.status == 2: check = "Online"
- elif status.status == 1: check = "Offline"
- else: check = "Unknown"
+ for url, status in result.data.iteritems():
+ if status.status == 2: check = "Online"
+ elif status.status == 1: check = "Offline"
+ else: check = "Unknown"
- print "%-30s: %-30s %-8s\t %s" % (url, status.name, formatSize(status.size), check)
+ print "%-30s: %-30s %-8s\t %s" % (url, status.name, formatSize(status.size), check)
- if "ALL_INFO_FETCHED" in result: break
+ if result.rid == -1: break
elif command == "pause":