Skip to content

Commit

Permalink
optional state
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasheinrich committed Nov 21, 2017
1 parent 354de6e commit e058a30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packtivity/asyncbackends.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def submit(self, spec, parameters, state, metadata = None):
spec = spec,
parameters = parameters,
state = state,
metadata = metadata or {'name': state.identifier()},
metadata = metadata,
config = self.config
)
return self.submit_callable(nullary)
Expand Down
2 changes: 1 addition & 1 deletion packtivity/logutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def default_logging_handlers(log,metadata,state,topic):

# Now that we have place to store meta information we put a file based logger in place
# to log at DEBUG
if state.metadir:
if state and state.metadir:
logname = '{}/{}.{}.log'.format(state.metadir,metadata['name'],topic)
fh = logging.FileHandler(logname)
fh.setLevel(logging.DEBUG)
Expand Down

0 comments on commit e058a30

Please sign in to comment.