Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 214729 Details for
Bug 299090
[EBUILD] mail-filter/dspam 3.10.0 and -9999 (GIT MASTER)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mail-filter/dspam/files/pgsql_purge.py
pgsql_purge.py (text/plain), 1.21 KB, created by
steveb
on 2009-12-31 11:58:04 UTC
(
hide
)
Description:
mail-filter/dspam/files/pgsql_purge.py
Filename:
MIME Type:
Creator:
steveb
Created:
2009-12-31 11:58:04 UTC
Size:
1.21 KB
patch
obsolete
>#!/bin/env python > >import sys, os >import psycopg2 >from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT > >def main(): > if len(sys.argv) == 5: > thiscript, serverhost, serverport, dspamdb, purgescript = sys.argv > else: > print "Usage: %s server_host server_port dspam_dbname purge_script" %(sys.argv[0]) > sys.exit(1) > try: > env = os.environ > dspamuser = env['PGUSER'] > dspampass = env['PGPASSWORD'] > if len(serverport) > 0: > con = psycopg2.connect(host=serverhost, port=int(serverport), database=dspamdb, user=dspamuser, password=dspampass) > else: > con = psycopg2.connect(host=serverhost, database=dspamdb, user=dspamuser, password=dspampass) > con.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) # Needed for plpgsql > cur = con.cursor() > except Exception, e: > print "ERROR: ",e > sys.exit(2) > try: > f = open(purgescript, 'r') > script = f.read() > f.close() > except Exception, e: > print "ERROR: ",e > sys.exit(3) > try: > cur.execute(script) > except Exception, e: > print "ERROR: ",e > sys.exit(4) > con.close() > >if __name__ == '__main__': > main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 299090
:
214722
|
214726
|
214727
| 214729 |
214730
|
214731
|
214733
|
214735
|
216134
|
216137
|
216650
|
216656
|
216658
|
216660
|
216678
|
216680
|
216681
|
216684
|
227655
|
227657
|
276007
|
276009
|
276011
|
276019
|
276021
|
281899
|
281901
|
281903
|
281905
|
282111
|
282113
|
282115
|
282117
|
282119
|
282121