Commit 6d807c31 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

First unpack, then consider options, while checking canonicals

parent cd093be8
......@@ -108,6 +108,9 @@ class Canonical(object):
return self.check(item)
def check(self, item):
if argmap_check(item):
item = self._unpack(item)
opts = self.opts
if item is None and 'default' in opts:
item = opts['default']
......@@ -116,9 +119,6 @@ class Canonical(object):
if item is None and can_be_null:
return None
if argmap_check(item):
item = self._unpack(item)
return self._check(item)
def _check(self, item):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment