Skip to content

Remove custom exception handling #117

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

Merged
merged 1 commit into from
Jun 13, 2020

Conversation

bessman
Copy link
Collaborator

@bessman bessman commented Jun 7, 2020

This PR removes the custom exception handling discussed in #115. It should not affect normal operation (with one exception, see below).

Additionally, it changes the behavior of ScienceLab.write_bulk_flash() by changing the indentation level if this block:

        # verification by readback
        tmp = [ord(a) for a in self.read_bulk_flash(location, len(data))]
        print('Verification done', tmp == data)
        if tmp != data: raise Exception('Verification by readback failed')

In the current version, this block will never be executed because it comes after a raise statement. This does not seem intentional, so I fixed it. I have not tested it, but since it does not write anything to the hardware it should be safe.

My IDE also autoremoved some trailing whitespace here and there throughout the code.

@bessman bessman requested review from CloudyPadmal and marcoag and removed request for marcoag June 7, 2020 15:52
@bessman
Copy link
Collaborator Author

bessman commented Jun 7, 2020

The Codacy quality issues are not really related to the changes introduces by this PR. I'd rather fix them in a separate PR at a later point.

@bessman bessman requested a review from marcoag June 13, 2020 15:17
@orangecms orangecms merged commit bbd02dd into fossasia:development Jun 13, 2020
@orangecms
Copy link
Contributor

The Codacy quality issues are not really related to the changes introduces by this PR. I'd rather fix them in a separate PR at a later point.

Looks like that came with #118. Should be fixed later. :)

@bessman bessman deleted the exception-handling branch August 10, 2020 07:33
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy