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

Fix import logic for importing customs list. #1343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arcase6
Copy link

@arcase6 arcase6 commented Dec 25, 2023

fix import logic for adding files to customs. Current logic always throws exception when trying to append to customs list because Import function has no return.

    #Import function from Scons codebase - does not return anything - merely updates global variables
    def Import(self, *vars):
        try:
            frame = call_stack[-1]
            globals = frame.globals
            exports = frame.exports
            for var in vars:
                var = self.Split(var)
                for v in var:
                    if v == '*':
                        globals.update(global_exports)
                        globals.update(exports)
                    else:
                        if v in exports:
                            globals[v] = exports[v]
                        else:
                            globals[v] = global_exports[v]
        except KeyError as x:
            raise SCons.Errors.UserError("Import of non-existent variable '%s'"%x)     

…eption when trying to append to customs list because Import function has no return.
@arcase6 arcase6 requested a review from a team as a code owner December 25, 2023 17:48
@dsnopek dsnopek added the topic:buildsystem Related to the buildsystem or CI setup label Jan 3, 2024
@dsnopek dsnopek added this to the 4.x milestone Jan 3, 2024
@dsnopek dsnopek added cmake and removed cmake labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants