diff options
-rwxr-xr-x | scripts/git-integration/git-update.py | 8 |
1 files changed, 5 insertions, 3 deletions
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']) |