-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature blocking #510
Feature blocking #510
Conversation
66e4c3a
to
3fccff0
Compare
3fccff0
to
9338c9c
Compare
…st known good version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the deletion of the tempfile should be sorted though. Otherwise it's fine.
safe_fail_request(400, message='Missing CLK and Blocks information') | ||
# fail condition5 - unknown element in JSON | ||
if 'clks' not in clk_json and 'clknblocks' not in clk_json: | ||
safe_fail_request(400, message='Unknown upload element - expect "clks" or "clknblocks"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this function would throw an exception instead of calling safe_fail_request
it would be nicely unit-testable.
raise ValueError('can only handle CLKs at the moment.') | ||
binary_data = b'\n'.join(''.join(clk.split('\n')).encode() for clk in data['clks']) + b'\n' | ||
buffer = io.BytesIO(binary_data) | ||
#### END GLUE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the most beautiful glue code I have ever seen.
Replaces #503. I can't review because I opened this PR.