From ec88a6f821dcd5e60fd4fd8d1f4fa94951f8340f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Thu, 16 Jun 2005 10:32:08 +0000 Subject: [PATCH] =?UTF-8?q?Unittestler=20birka=C3=A7=20hata=20daha=20yakal?= =?UTF-8?q?ad=C4=B1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit her spec dosyası içerisinde dependency tanımları ve patch olmak zorunda değil. specfile içerisinde bunun için gerekli düzenleme yapıldı. xmlfile içerisine xml hata-yakalama eklendi. --- src/pisi/specfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pisi/specfile.py b/src/pisi/specfile.py index 30d88598..1c294216 100644 --- a/src/pisi/specfile.py +++ b/src/pisi/specfile.py @@ -65,10 +65,12 @@ class SpecFile(XmlFile): self.source.archiveType = getNodeAttribute(archiveNode, "archType") self.source.archiveMD5 = getNodeAttribute(archiveNode, "md5sum") patchElts = self.getChildElts("Source/Patches") - self.source.patches = [ PatchInfo(p) for p in patchElts ] + if patchElts: + self.source.patches = [ PatchInfo(p) for p in patchElts ] buildDepElts = self.getChildElts("Source/BuildDependencies") - self.source.buildDeps = [DepInfo(d) for d in buildDepElts] + if buildDepElts: + self.source.buildDeps = [DepInfo(d) for d in buildDepElts] historyElts = self.getAllNodes("History/Update") self.source.history = [HistoryInfo(x) for x in historyElts]