bin/rmlist -a does not removes the database of a Dlist automatically instead always gives an error message in error log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Systers-mailman |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
It seems support for Dlist was added in /bin/rmlist by the following lines:
# Remove the database in PostgreSQL if it was a dynamic list. Added by Systers.
try:
conn = DlistUtils.
old_iso_lvl = conn.isolation_
cursor = conn.cursor()
except:
But every time we try to delete a dlist by using the command bin/rmlist -a then everything gets deleted besides the database and always the except part of the above lines of code is executed.
The reason behind this is that:
Every time for executing store functions(in DlistUtils.py) you needed to
1)Establish connection with Database via
'database = getConn(mlist)'
(If you see getConn() function in DlistUtils.py you will find that create_database() is used to create this cursor)
2)The 'database' cursor so generated was later on used for creating a store object corresponding to that database using
store = Store(database).
This cursor generated is different from the cursor that is generated via
'conn = pgdb.connect(
This was used before storm was implemented.
Therefore I had left the function used for creating database(
Since above getConn() is being used for creating the cursor 'conn' therefore "conn.set_
always gives an error hence except part is executed always.
I have solved the bug.Will commit the changes soon.