[Cdd-commits] r812 - in cdd/trunk/webtools: . templates

CDD Subversion Commit noreply at alioth.debian.org
Mon Jun 16 09:53:03 UTC 2008


Author: tille
Date: Mon Jun 16 09:53:02 2008
New Revision: 812

Modified:
   cdd/trunk/webtools/cddtasktools.py
   cdd/trunk/webtools/tasks.py
   cdd/trunk/webtools/templates/tasks.xhtml
Log:
catching further unicode exceptions.


Modified: cdd/trunk/webtools/cddtasktools.py
==============================================================================
--- cdd/trunk/webtools/cddtasktools.py	(original)
+++ cdd/trunk/webtools/cddtasktools.py	Mon Jun 16 09:53:02 2008
@@ -606,8 +606,13 @@
                     deppkg.homepage = '.' # Something else in case unexpected things happen
                 deppkg.version      = stanza['version'].split('-')[0]
                 deppkg.section      = stanza['section']
-                deppkg.responsible  = re.sub('\s*(.+)\s+<(.+ at .+)>\s*', '<a href="mailto:\\2">\\1</a>', \
-                                             stanza['maintainer'])
+                responsible  = re.sub('\s*(.+)\s+<(.+ at .+)>\s*', '<a href="mailto:\\2">\\1</a>', stanza['maintainer'])
+                # Markup to make sure the string is inserted verbatim in Template
+                try:
+            	    deppkg.responsible  = Markup(responsible)
+        	except UnicodeDecodeError:
+                    print >> stderr, "Can not Markup %s because of unicode error" % responsible
+                    deppkg.responsible  = "DEBUG: Responsible of %s has Unicode problems" % deppkg.pkg 
                 deppkg.filename     = BASEURL+stanza['filename']
                 self.packages[component][stanza['package']] = deppkg
             g.close()

Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py	(original)
+++ cdd/trunk/webtools/tasks.py	Mon Jun 16 09:53:02 2008
@@ -80,8 +80,8 @@
 		data['task']         = task
 		data['projectkeys']  = cdeps.GetListOfDepsForTask(task, dependencytypes=())
 		data['dependencies'] = []
-		for type in ['unofficial', 'prospective', 'official', 'unknown']:
-		    if type in cdeps.tasks[task].dependencies.keys():
+		for type in ['official', 'prospective', 'unofficial', 'unknown']:
+		    if len(cdeps.tasks[task].dependencies[type]) > 0:
 			data['dependencies'].append(type)
 		print "DEBUG: Dependencies of %s: %s" % (task, str(data['dependencies']))
 		data['projects']     = cdeps.tasks[task].dependencies

Modified: cdd/trunk/webtools/templates/tasks.xhtml
==============================================================================
--- cdd/trunk/webtools/templates/tasks.xhtml	(original)
+++ cdd/trunk/webtools/templates/tasks.xhtml	Mon Jun 16 09:53:02 2008
@@ -30,9 +30,13 @@
 			</div>
 			<div class="row">
 				<p>
-					The list to the right includes various software projects which are of some interest to the Debian-Med Project.					Currently, only a few of them are available as Debian packages.					It is our goal, however, to include all software in Debian-Med which can sensibly add to a high quality Custom Debian Distribution.				</p>
+					The list to the right includes various software projects which are of some interest to the Debian-Med Project.
+					Currently, only a few of them are available as Debian packages.
+					It is our goal, however, to include all software in Debian-Med which can sensibly add to a high quality Custom Debian Distribution.
+				</p>
 				<p>
-					For a better overview of the project's availability as a Debian package, each head row has a color code according to this scheme:				</p>
+					For a better overview of the project's availability as a Debian package, each head row has a color code according to this scheme:
+				</p>
 				<ul>
 					<li>Green: The project is <a href="#official-debs">available as an official Debian package</a></li>
 					<li>Yellow: The project is <a href="#inofficial-debs">available as an inofficial Debian package</a></li>
@@ -52,7 +56,7 @@
        ${typeheading}
 </h2>
    <py:for each="project in projects[type]">
-     <table class="project" summary="$project">
+     <table class="project" summary="${project.pkg}">
        <tbody>
 	 <tr class="deb-${type}">
 	   <td class="project-name">
@@ -66,9 +70,13 @@
            <td class="project-license">
              <em py:if="project.version != None">${version}: ${project.version}</em>
              <em>${license}: ${project.license}</em><br/>
-                 <span py:if="project.filename != None">
+               <span py:choose="type">
+                 <span py:when="'official'">
                         <a href="${project.pkgURL}">Official Debian package</a> - <a href="${project.pkgURL}/${project.filename}"><img src="deb-icon.png"/></a>
                  </span>
+                 <span py:when="'prospective'"><a href="${project.pkgURL}">Unofficial Debian package</a></span>
+                 <span py:otherwise="">Debian package not available</span>
+               </span>
            </td>
          </tr>
          <tr>
@@ -78,14 +86,6 @@
        </tbody>
      </table>
    </py:for>
-
-<!--
-							<a href="http://sourceforge.net/project/showfiles.php?group_id=61662%26package_id=60298">Unofficial Debian package</a>
-
-
-
-							Debian package not available
--->
 </py:for>
 		</div>
 	</td>



More information about the Cdd-commits mailing list