From 2d96b51cb5dafec5b8db4a0d0f8aa3e540669cc0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 8 Jan 2015 09:16:35 +0100 Subject: git-update.py: Do not wipe repository descriptions Only update repository descriptions if there is at least one package in the package base meta data. Signed-off-by: Lukas Fleischer --- scripts/git-integration/git-update.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts/git-integration') diff --git a/scripts/git-integration/git-update.py b/scripts/git-integration/git-update.py index 15a731c..3d2742a 100755 --- a/scripts/git-integration/git-update.py +++ b/scripts/git-integration/git-update.py @@ -239,6 +239,8 @@ save_srcinfo(srcinfo, db, cur, user) db.close() -with open(git_dir + '/description', 'w') as f: - pkginfo = srcinfo.GetMergedPackage(list(srcinfo.GetPackageNames())[0]) - f.write(pkginfo['pkgdesc']) +pkglist = list(srcinfo.GetPackageNames()) +if len(pkglist) > 0: + with open(git_dir + '/description', 'w') as f: + pkginfo = srcinfo.GetMergedPackage(pkglist[0]) + f.write(pkginfo['pkgdesc']) -- cgit v1.2.3-70-g09d2