Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure context is not None in emitted signals if it was auto-created internally #398

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyblish/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def publish_iter(context=None, plugins=None, targets=None):
print result

"""
context = api.Context() if context is None else context
for result in _convenience_iter(context, plugins, targets):
yield result

Expand Down Expand Up @@ -252,6 +253,7 @@ def integrate(context=None, plugins=None, targets=None):


def collect_iter(context=None, plugins=None, targets=None):
context = api.Context() if context is None else context
for result in _convenience_iter(context, plugins, targets,
order=api.CollectorOrder):
yield result
Expand All @@ -260,6 +262,7 @@ def collect_iter(context=None, plugins=None, targets=None):


def validate_iter(context=None, plugins=None, targets=None):
context = api.Context() if context is None else context
for result in _convenience_iter(context, plugins, targets,
order=api.ValidatorOrder):
yield result
Expand All @@ -268,6 +271,7 @@ def validate_iter(context=None, plugins=None, targets=None):


def extract_iter(context=None, plugins=None, targets=None):
context = api.Context() if context is None else context
for result in _convenience_iter(context, plugins, targets,
order=api.ExtractorOrder):
yield result
Expand All @@ -276,6 +280,7 @@ def extract_iter(context=None, plugins=None, targets=None):


def integrate_iter(context=None, plugins=None, targets=None):
context = api.Context() if context is None else context
for result in _convenience_iter(context, plugins, targets,
order=api.IntegratorOrder):
yield result
Expand Down