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

Clean up minor warnings from LGTM.com #7500

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

earlephilhower
Copy link
Collaborator

@earlephilhower earlephilhower commented Aug 2, 2020

LGTM (Semmie) is a tool, bought by GitHub last year, that conducts basic
linting tasks on code and HTML.

Clean up the warnings identified in the latest report:
https://lgtm.com/projects/g/esp8266/Arduino/?mode=list

No functionality should change, however this may fix some issues with
the python utilities not exiting properly on a Ctrl-C from the command
line.

LGTM (Semmie) is a tool, bought by GitHub last year, that conducts basic
linting tasks on code and HTML.

Clean up the warnings identified in the latest report:
https://lgtm.com/projects/g/esp8266/Arduino/?mode=list

No functionality should change, however this may fix some issues with
the perl utilities not exiting properly on a Ctrl-C from the command
line.
@earlephilhower earlephilhower merged commit 9afb084 into esp8266:master Aug 4, 2020
@earlephilhower earlephilhower deleted the lgtmfix branch August 4, 2020 02:19
@mcspr
Copy link
Collaborator

mcspr commented Aug 4, 2020

Re:

No functionality should change, however this may fix some issues with
the python utilities not exiting properly on a Ctrl-C from the command
line.

ref. https://lgtm.com/rules/6780080/, KeyboardInterrupt wont trigger the except Exception:, but it did before:

try:
    while True:
        pass
except KeyboardInterrupt:
    print("fu")
except Exception:
    print("foo")

print("bar")

# $ python3 script.py
# ^Cfu
# bar
# $

espota.py and elf2bin.py seems to be the only ones with code iside there
idk about espota right now though, but elf2bin change seems legit
yeah, on a second thought, I am not sure what that except is supposed to do there :/

@earlephilhower
Copy link
Collaborator Author

KeyboardInterrupt wont trigger the except Exception:, but it did before:

That's the idea. Before Ctrl-C would get caught in the except: passes, now it should stop the app completely as an unhandled exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants