diff options
author | mkaay <mkaay@mkaay.de> | 2011-02-12 01:55:39 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-02-12 01:55:39 +0100 |
commit | 27d8fe970c2102edb3fc5bc333b05f975e5ae2d3 (patch) | |
tree | 092600f0fb2c44fde8d0d5324a8beb28249cad70 /module/remote | |
parent | gui freze fix, closes #240, sslxmlrpc fix? (diff) | |
download | pyload-27d8fe970c2102edb3fc5bc333b05f975e5ae2d3.tar.xz |
gui optimisations
Diffstat (limited to 'module/remote')
-rw-r--r-- | module/remote/thriftbackend/ThriftTest.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/module/remote/thriftbackend/ThriftTest.py b/module/remote/thriftbackend/ThriftTest.py index 8cfeb68d5..69ac6a745 100644 --- a/module/remote/thriftbackend/ThriftTest.py +++ b/module/remote/thriftbackend/ThriftTest.py @@ -30,10 +30,14 @@ def bench(f, *args, **kwargs): print "%s: %f s" % (f.__name__, e-s) return ret +from getpass import getpass +user = raw_input("user ") +passwd = getpass("password ") + server_url = "http%s://%s:%s@%s:%s/" % ( "", - "user", - "password", + user, + passwd, "127.0.0.1", 7227 ) @@ -42,8 +46,8 @@ proxy = xmlrpclib.ServerProxy(server_url, allow_none=True) bench(proxy.get_server_version) bench(proxy.status_server) bench(proxy.status_downloads) -bench(proxy.get_queue) -bench(proxy.get_collector) +#bench(proxy.get_queue) +#bench(proxy.get_collector) print try: @@ -62,13 +66,13 @@ try: # Connect! transport.open() - print "Login", client.login("User", "pyloadweb") + print "Login", client.login(user, passwd) bench(client.getServerVersion) bench(client.statusServer) bench(client.statusDownloads) - bench(client.getQueue) - bench(client.getCollector) + #bench(client.getQueue) + #bench(client.getCollector) print print client.getServerVersion() |