Commit 0e311680 authored by Sriram Karra's avatar Sriram Karra

--op=del-folder now works with the Collection chnages

parent 364963d9
......@@ -569,8 +569,10 @@ class BBPIMDB(PIMDB):
fold = st.get_folder(gid)'Deleting Entries in folder: %s...', fold.get_name())
self.remove_folder(fold)'Deleting Entries in folder: %s...done', fold.get_name())
def set_folders (self):
"""See the documentation in class PIMDB"""
......@@ -419,22 +419,21 @@ class Asynk:
def op_del_folder (self):
# There should only be one DB specified
if self.get_db2():
if len(self.get_colls()) != 1:
raise AsynkParserError('Please specify only 1 db with --db '
'where new folder is to be created')
dbid = self.get_db1()
store = self.get_store_id(dbid)
fid = self.get_folder_id(dbid)
coll = self.get_colls()[0]
dbid = coll.get_dbid()
stid = coll.get_stid()
fid = coll.get_fid()
if not fid and not ('bb' == dbid):
raise AsynkParserError('--del-folder needs a --folder-id option')
raise AsynkParserError('--del-folder needs a --folder option')
db = self.get_db(dbid)
db.del_folder(fid, store)
coll.get_db().del_folder(fid, stid)
def op_list_profiles (self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment