Signed-off-by: Chris Lamb <lamby@debian.org>
os.symlink(path, os.path.join(target_dir, filename))
return True
+ session = DBConn().session()
found = False
# Look in the pool
- for poolfile in get_poolfile_like_name('/%s' % filename):
+ for poolfile in get_poolfile_like_name('/%s' % filename, session):
poolfile_path = os.path.join(
poolfile.location.path, poolfile.filename
)
found = True
break
+ session.close()
+
if found:
continue