Skip to content

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.

2 participants