/[shmookey]/portconf/logout.py


UCC Code Repository

Contents of /portconf/logout.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 117 - (hide annotations) (download) (as text)
Tue Jun 3 07:49:09 2008 UTC (13 years, 6 months ago) by shmookey
File MIME type: text/x-python
File size: 816 byte(s)
login stuff all working, still needs authentication source

1 shmookey 117 #!/usr/bin/python
2    
3     import sys, os, re, pexpect, time, Cookie
4     import Log, common
5    
6     try:
7     from Config import libPaths, dbName, dbUser, dbPass, dbHost, dbPort
8     except:
9     Log.Message ("Error occured in finding basic configuration paramaters. Reverting to installer.", "index.py", "ERROR")
10     import install
11     sys.exit ()
12    
13     for path in libPaths: sys.path.append (path)
14    
15     try:
16     import pycisco, pyaaa
17     except:
18     Log.Message ("Couldn't import pycisco or pyaaa. Reverting to installer.", "index.py", "ERROR")
19     import install
20     sys.exit ()
21    
22     import cgi, cgitb
23     cgitb.enable ()
24    
25     import Cookie
26    
27     try:
28     cookie = Cookie.SimpleCookie (os.environ.get("HTTP_COOKIE", ""))
29     obj = pyaaa.SafeBase ()
30     obj._Resume (cookie["sid"].value)
31     obj._Logout ()
32     except:
33     pass
34    
35     print "Location: /"
36     print

Properties

Name Value
svn:executable *

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26