22 lines
496 B
Python
22 lines
496 B
Python
|
#!/usr/bin/python
|
||
|
# XML-RPC-Client
|
||
|
# (c) 2006 Jan Dittberner
|
||
|
# version: $Id$
|
||
|
#
|
||
|
from xmlrpclib import ServerProxy
|
||
|
import logging, sys
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
server = ServerProxy('http://localhost:8080')
|
||
|
logger = logging.getLogger()
|
||
|
logging.basicConfig()
|
||
|
|
||
|
try:
|
||
|
sessionid = server.login('jan', 'heyyou97')
|
||
|
if sessionid:
|
||
|
server.listDomains(sessionid)
|
||
|
else:
|
||
|
print "login failed"
|
||
|
except Exception, v:
|
||
|
logger.exception(v)
|