Commits

w...@styx.org  committed 4d5ffb9

fix bug with no default resource and bump version

  • Participants
  • Parent commits 6cab4b6
  • Tags 0.22

Comments (0)

Files changed (2)

File ordf/vocab/fresnel.py

                 log.debug("    Type: %s" % typ)
                 resources = list(graph.triples((resource, RDF["type"], typ)))
                 resources.sort(lambda x,y: cmp(x[0], y[0]))
-                for resource, _p, _o in resources:
-                    styles, element = lens.formatResource(graph, resource)
+                for s, _p, _o in resources:
+                    styles, element = lens.formatResource(graph, s)
                     [stylesheets.add(x) for x in styles]
                     root.append(element)
 
         tmp = self.handler.get(fresnel_uri)
         fresnel = Fresnel(store=tmp.store, identifier=tmp.identifier)
         graph = self.handler.get(graph_uri)
-        stylesheets, tree = fresnel.format(graph, URIRef(self.options.resource))
+        stylesheets, tree = fresnel.format(graph, URIRef(self.options.resource) if self.options.resource else None)
 
         head = template.find("head")
         if head is None:
 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.20'
+version = '0.22'
 
 try:
     from mercurial import ui, hg, error