Mercurial > p > roundup > code
comparison roundup/backends/back_postgresql.py @ 2256:0b198ed096af
fixes for py2.1 (booleans, sigh)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 06 May 2004 01:12:24 +0000 |
| parents | 20507f6759fc |
| children | 7d0bb6601809 |
comparison
equal
deleted
inserted
replaced
| 2255:4990fd3d57a7 | 2256:0b198ed096af |
|---|---|
| 25 """Clear all database contents and drop database itself""" | 25 """Clear all database contents and drop database itself""" |
| 26 if __debug__: | 26 if __debug__: |
| 27 print >> hyperdb.DEBUG, '+++ nuke database +++' | 27 print >> hyperdb.DEBUG, '+++ nuke database +++' |
| 28 command = 'DROP DATABASE %s'% config.POSTGRESQL_DATABASE['database'] | 28 command = 'DROP DATABASE %s'% config.POSTGRESQL_DATABASE['database'] |
| 29 db_command(config, command) | 29 db_command(config, command) |
| 30 | |
| 31 if os.path.exists(config.DATABASE): | |
| 32 shutil.rmtree(config.DATABASE) | |
| 30 | 33 |
| 31 def db_command(config, command): | 34 def db_command(config, command): |
| 32 '''Perform some sort of database-level command. Retry 10 times if we | 35 '''Perform some sort of database-level command. Retry 10 times if we |
| 33 fail by conflicting with another user. | 36 fail by conflicting with another user. |
| 34 ''' | 37 ''' |
