changeset 397:a7bf4464bd60 treepkg-status

fixed some typos added missing add_checksum methond
author Bjoern Ricks <bricks@intevation.de>
date Fri, 09 Jul 2010 14:44:52 +0000
parents 343af65e808b
children 09b7b7bf0b04
files treepkg/info/status.py
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/info/status.py	Fri Jul 09 14:19:17 2010 +0000
+++ b/treepkg/info/status.py	Fri Jul 09 14:44:52 2010 +0000
@@ -11,7 +11,7 @@
 import xml.dom.minidom
 
 from treepkg.report import get_packager_group
-
+from treepkg.util import md5sum
 
 TREEPKG_NAMESPACE_URI = "http://wald.intevation.org/projects/treepkg/"
 TREEPKG_NAMESPACE_PREFIX = "tpkg"
@@ -58,8 +58,8 @@
         arch = "def arch"
         platforminfo = TreepkgPlatformInfo(os, arch)
         logs = revision.get_log_files()
-        for (title, file) in logs:
-            loginfo = TreepkgLogInfo(title, file)
+        for (title, filename) in logs:
+            loginfo = TreepkgLogInfo(title, filename)
             platforminfo.add_log(loginfo)
         sources = revision.list_source_files()
         for source in sources:
@@ -113,7 +113,7 @@
             versionele = createTpkgElement(doc, "version")
             text = doc.createTextNode(self.version)
             versionele.appendChild(text)
-            root.appendChild(version)
+            root.appendChild(versionele)
         if len(self.tracks) > 0:
             tracksele = createTpkgElement(doc, "tracks")
             for track in self.tracks:
@@ -153,7 +153,7 @@
         # add <number>
         numberele = createTpkgElement(doc, "number")
         text = doc.createTextNode(self.number)
-        numbverele.appendChild(text)
+        numberele.appendChild(text)
         root.appendChild(numberele)
         # add <rules>
         rulesele = createTpkgElement(doc, "rules")
@@ -168,7 +168,7 @@
         statusele.appendChild(messageele)
         root.appendChild(statusele)
         # add <platform>
-        root.appendChild(platform.toxml())
+        root.appendChild(self.platform.toxml())
         return root
 
 class TreepkgPlatformInfo:
@@ -194,7 +194,7 @@
         root.appendChild(osele)
         # add <arch>
         archele = createTpkgElement(doc, "arch")
-        text = doc.createTextNode(sef.arch)
+        text = doc.createTextNode(self.arch)
         archele.appendChild(text)
         root.appendChild(archele)
         # add <packages>
@@ -205,7 +205,7 @@
         # add <logs>
         logsele = createTpkgElement(doc, "logs")
         for log in self.logs:
-            losele.appendChild(log)
+            logsele.appendChild(log)
         root.appendChild(logsele)
         return root
 
@@ -245,7 +245,7 @@
         nameele.appendChild(text)
         root.appendChild(nameele)
         # add <path>
-        pathele = createTpkgElement("path")
+        pathele = createTpkgElement(doc, "path")
         text = doc.createTextNode(self.path)
         pathele.appendChild(text)
         root.appendChild(pathele)
@@ -259,9 +259,12 @@
         root.appendChild(typeele)
         return root
 
+    def add_checksum(self, checksum):
+        self.checksums.append(checksum)
+
 class TreepkgChecksumInfo:
     
-    def __inif__(self, checksum, type="md5"):
+    def __init__(self, checksum, type="md5"):
         self.checksum = checksum
         self.type = type
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)