~ubuntu-branches/ubuntu/intrepid/moin/intrepid-updates

« back to all changes in this revision

Viewing changes to MoinMoin/script/old/xmlrpc-tools/WhoAmI.py

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
"""
 
3
This script checks whether the wiki authenticates and trusts you.
 
4
 
 
5
It calls the TrustMe.py xmlrpc plugin. To use http auth, you need to configure
 
6
the srcwiki with auth = [http, moin_cookie] in its wikiconfig.
 
7
 
 
8
GPL software, 2005 Thomas Waldmann
 
9
"""
 
10
 
 
11
def run():
 
12
    user = "ThomasWaldmann"
 
13
    password = "wrong"
 
14
 
 
15
    import sys, xmlrpclib
 
16
    sys.path.insert(0, '../../..')
 
17
    from MoinMoin.support.BasicAuthTransport import BasicAuthTransport
 
18
 
 
19
    srctrans = BasicAuthTransport(user, password)
 
20
    srcwiki = xmlrpclib.ServerProxy("http://moinmaster.wikiwikiweb.de/?action=xmlrpc2", transport=srctrans)
 
21
 
 
22
    print srcwiki.WhoAmI()
 
23
 
 
24
if __name__ == "__main__":
 
25
    run()
 
26