Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 213dbec9 authored by Betoule Marc's avatar Betoule Marc
Browse files

bug correction for two leaf in lspipe

parent 8258619f
......@@ -201,7 +201,7 @@ def del_tag (db_file, tag):
conn.execute('update segments set tag=? where seg_id=?',(str_tag,s[0]))
fn = glob(os.path.join(s[2], "*.meta"))
_update_meta(fn, str_tag)
conn.execute("update segments set tag='' where tag==';'")
def _delseg(db_file, lst_seg):
......
......@@ -75,14 +75,15 @@ class Pipe():
self.cache = Cache()
self.conn = self.cache.getdb(pipepath, dbfile)
if tag:
s = self.conn.execute('select seg_id from segments where tag == ?',(tag,)).fetchone()
s = self.conn.execute('select seg_id from segments where tag == ?',(tag,)).fetchall()
if s is None:
s = self.conn.execute('select seg_id from segments where tag == ?',(";"+tag,)).fetchone()
s = self.conn.execute('select seg_id from segments where tag == ?',(";"+tag,)).fetchall()
else:
s = self.conn.execute('select seg_id from segments where curr_dir like ?',("%"+self.path+"%",)).fetchone()
lstseg = [s[0]]
lstseg+=self._get_fathers(s[0])
self.lstseg = lstseg
s = self.conn.execute('select seg_id from segments where curr_dir like ?',("%"+self.path+"%",)).fetchall()
lstseg = [_s[0] for _s in s]
for _s in s:
lstseg+=self._get_fathers(_s[0])
self.lstseg = list(set(lstseg))
del self.cache
def _get_fathers(self, segid):
......
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