提交 c629ed1c 编写于 作者: C Chris Lamb

Use the same session when getting pool entries, otherwise we can't do poolfile.location

Signed-off-by: NChris Lamb <lamby@debian.org>
上级 8987bb47
......@@ -1234,10 +1234,11 @@ class Upload(object):
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
)
......@@ -1246,6 +1247,8 @@ class Upload(object):
found = True
break
session.close()
if found:
continue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册