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

Small bug fix when no llh_name is used #129

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Small bug fix when no llh_name is used #129

merged 1 commit into from
Jan 12, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jan 12, 2024

If no self.llh_name is provided, the for loop will be interrupted,

if self.llh_name is None:
, so that the attribute is not set
setattr(self, sigma, maps[sigma])
.

To reproduce the bug:

import aptext
aptext.cut_acc_cs.cS1CutAccept()

error shows:

AttributeError: 'SigmaMap' object has no attribute 'median'

The solution is to move the setattr before continue.

@dachengx dachengx added the bug Something isn't working label Jan 12, 2024
@coveralls
Copy link

coveralls commented Jan 12, 2024

Pull Request Test Coverage Report for Build 7499186216

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.073%

Totals Coverage Status
Change from base Build 7461388287: 0.0%
Covered Lines: 1969
Relevant Lines: 2342

💛 - Coveralls

@dachengx dachengx marked this pull request as ready for review January 12, 2024 07:40
@dachengx dachengx merged commit f678220 into master Jan 12, 2024
7 checks passed
@dachengx dachengx deleted the fix_config_llh branch January 12, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants