Omit missing kwargs so as not to override defaults

The default image cache strategy was being overridden, which prevented
images from being generated.
This commit is contained in:
Matthew Tretter 2012-10-25 22:25:18 -04:00
parent 006ff54fa8
commit 76b9ebbab4

View file

@ -233,7 +233,7 @@ class SpecHost(object):
raise TypeError('You can provide either an image spec or'
' arguments for the ImageSpec constructor, but not both.')
else:
spec = type('Spec', (ImageSpec,), spec_args) # TODO: Base class name on spec id?
spec = type('Spec', (ImageSpec,), dict((k, v) for k, v in spec_args.items() if v is not None)) # TODO: Base class name on spec id?
self._original_spec = spec