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

Undefined name: log() must be imported before it is called #69

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link

@cclauss cclauss commented Jun 29, 2022

log() is imported on line 32 after it is called on line 22 which will result in a NameError being raised from the bare except with nothing logged.

$ flake8 . --count --select=E9,F63,F7,F82,Y --show-source --statistics

./bup/lib/bup/cmd/fuse.py:21:9: F821 undefined name 'log'
        log('error: cannot determine the fuse major version; please report',
        ^
1     F821 undefined name 'log'
1

We discuss code changes on the mailing list bup-list@googlegroups.com,
but if you'd prefer to begin the process with a pull request, that's
just fine. We're happy to have the help.

In any case, please make sure each commit includes a

Signed-off-by: Someone someone@some.where

line in the commit message that matches the "Author" line so that
we'll be able to include your work in the project. See
./SIGNED-OFF-BY for the meaning:

https://github.com/bup/bup/blob/master/SIGNED-OFF-BY

After you submit the pull request, someone will eventually redirect it
to the list for review, and you will of course be included in the
conversation there.

On the other hand, if you're comfortable with "git send-email" (or the
equivalent), please post your patches to the list as described in the
"Submitting Patches" section in ./HACKING:

https://github.com/bup/bup/blob/master/HACKING

`log()` is imported on line 32 ___after___ it is called on line 22 which will result in a NameError being raised from the bare except with nothing logged.
@cclauss
Copy link
Author

cclauss commented Jun 29, 2022

The freebsd error is related to christiansandberg/pytest-reporter#5

@rlbdv
Copy link
Member

rlbdv commented Jul 2, 2022

Thanks for the help. It turns out that Johannes already had a patch to discriminate between pthon-fuse and fusepy that I think covered this case. So I believe the problem may have been fixed by b7c608d but please let us know if that's not the case.

@rlbdv rlbdv closed this Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants