Anonymous committed 4d5ffb9

fix bug with no default resource and bump version

Comments (0)

Files changed (2)


                 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]
         tmp = self.handler.get(fresnel_uri)
         fresnel = Fresnel(, 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'
     from mercurial import ui, hg, error