Skip to content

Moved RuntimeError from initialisation of Dummy ctype to where the va…#1

Open
T-BA wants to merge 1 commit intomasterfrom
DummyTypeException
Open

Moved RuntimeError from initialisation of Dummy ctype to where the va…#1
T-BA wants to merge 1 commit intomasterfrom
DummyTypeException

Conversation

@T-BA
Copy link
Copy Markdown
Contributor

@T-BA T-BA commented Dec 5, 2018

Moved RuntimeError from initialisation of Dummy ctype to where the variable is written. Reading is allowed for easier debugging.

…riable is written. Reading is allowed for easier debugging.
@T-BA T-BA requested a review from timonmentink December 5, 2018 09:42
@T-BA T-BA requested a review from rreilink December 14, 2018 09:46
@rreilink
Copy link
Copy Markdown
Contributor

Can you provide an example use case which shows the easier debugging?

Comment thread ads/adssymbols.py
def __init__(self, *args):
raise RuntimeError('Dummy ctypes object cannot be created or written')
pass # moved RuntimeError to where the variable is written
# raise RuntimeError('Dummy ctypes object cannot be created or written')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this commented line.

Comment thread ads/adssymbols.py
_type_ = c_ubyte
def __init__(self, *args):
raise RuntimeError('Dummy ctypes object cannot be created or written')
pass # moved RuntimeError to where the variable is written
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment does not belong in the code, it is in the GIT history. This whole __init__ can now be removed.

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.

4 participants