Skip to content

Commit

Permalink
Fix Config.override_channels property (#5324)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard authored May 2, 2024
1 parent 2fb469a commit ae6e529
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions conda_build/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,12 @@ def subdirs_same(self):
@deprecated(
"24.5",
"24.7",
addendum="Use `conda.base.context.context.override_channels` instead.",
addendum="Defer to `conda.base.context.context.channels` instead.",
)
def override_channels(self):
return context.override_channels
def override_channels(self) -> bool:
return bool(
context._argparse_args and context._argparse_args.get("override_channels")
)

def clean(self, remove_folders=True):
# build folder is the whole burrito containing envs and source folders
Expand Down
2 changes: 1 addition & 1 deletion news/5271-context
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Deprecations

* Deprecate `conda_build.config.Config.override_channels`. Use `conda.base.context.context.override_channels` instead. (#5271)
* Deprecate `conda_build.config.Config.override_channels`. Defer to `conda.base.context.context.channels` instead. (#5271, #5324)

### Docs

Expand Down

0 comments on commit ae6e529

Please sign in to comment.