Skip to content

Commit

Permalink
pass through return values in decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunc committed Jul 7, 2011
1 parent 640e052 commit 75cd2c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions freshen/stepregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def run(self, *args, **kwargs):
self.func(*args, **kwargs)

def __call__(self, *args, **kwargs):
self.func(*args, **kwargs)
return self.func(*args, **kwargs)

def match(self, match):
if not hasattr( self, 're_spec' ):
Expand Down Expand Up @@ -122,7 +122,7 @@ def run(self, scenario):
self.func(scenario)

def __call__(self, *args, **kwargs):
self.func(*args, **kwargs)
return self.func(*args, **kwargs)

class TransformImpl(WithReprMixin):

Expand Down Expand Up @@ -247,6 +247,8 @@ def add_named_transform( self, named_transform ):
named_transform.apply_to_step( step )

def _apply_transforms(self, iarg, arg, step):
# deal with missing "optional" arguments (coded in "?" block in re)
if arg is None: return None
nt_iter = izip( step.named_transforms, step.named_transform_positions )

for transform, ipos in nt_iter:
Expand Down

0 comments on commit 75cd2c2

Please sign in to comment.