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

FormatSMVJHSim AttributeError bugfix #710

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

dagewa
Copy link
Member

@dagewa dagewa commented Mar 15, 2024

I inadvertently introduced this bug in #708. When an SMV file does not have a BEAMLINE header entry, the get call returned None, so calling lower() on the result gave this error.

@dagewa dagewa enabled auto-merge (squash) March 15, 2024 14:24
@dagewa
Copy link
Member Author

dagewa commented Mar 15, 2024

The CI seems to be broken, but the fix is definitely correct so I'm merging.

@dagewa dagewa disabled auto-merge March 15, 2024 14:58
@dagewa
Copy link
Member Author

dagewa commented Mar 15, 2024

Oh, maybe I can't?

Copy link
Collaborator

@graeme-winter graeme-winter left a comment

Choose a reason for hiding this comment

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

Will force merge 👍

@@ -31,7 +31,7 @@ def understand(image_file):

size, header = FormatSMV.get_smv_header(image_file)

if header.get("BEAMLINE").lower() == "fake":
if header.get("BEAMLINE", "").lower() == "fake":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sensible

@graeme-winter graeme-winter merged commit 080b599 into cctbx:main Mar 15, 2024
8 of 12 checks passed
toastisme pushed a commit to toastisme/dxtbx that referenced this pull request Jul 18, 2024
* Bugfix: need to avoid None

* News

* Rename newsfragments/xxx.bugfix to newsfragments/710.bugfix

---------

Co-authored-by: DiamondLightSource-build-server <DiamondLightSource-build-server@users.noreply.github.com>
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