Skip to content

emrg: move EVOLUTION_CWD to module level, fix AttributeError in EmrgServer - #82

Merged
argszero merged 1 commit into
masterfrom
fix/evolution-cwd-attributeerror
Jul 20, 2026
Merged

emrg: move EVOLUTION_CWD to module level, fix AttributeError in EmrgServer#82
argszero merged 1 commit into
masterfrom
fix/evolution-cwd-attributeerror

Conversation

@argszero

Copy link
Copy Markdown
Owner

Fix

EmrgServer._touch_project and _handle_list_projects referenced self.EVOLUTION_CWD, but EVOLUTION_CWD was only defined as a class constant on BackgroundThread. Since EmrgServer does not inherit from BackgroundThread, this caused an AttributeError crash whenever a client connected and _touch_project was called.

Changed

  • Moved EVOLUTION_CWD to a module-level constant (before both class definitions)
  • Kept a class alias EVOLUTION_CWD = EVOLUTION_CWD in BackgroundThread for backward compatibility
  • Updated the two EmrgServer call sites (_touch_project, _handle_list_projects) to use the module-level name

Verification

  • pytest: 239 passed
  • Import check: OK
  • --help: OK

…erver
EmrgServer._touch_project and _handle_list_projects referenced
self.EVOLUTION_CWD, but EVOLUTION_CWD was a class constant on
BackgroundThread — not inherited by EmrgServer — causing AttributeError
whenever a client connected.
Moved EVOLUTION_CWD to a module-level constant (before both classes),
kept a class alias in BackgroundThread for backward compatibility,
and updated the two EmrgServer call sites to use the module-level name.
@argszero
argszeroforce-pushed the fix/evolution-cwd-attributeerror branch from 196f87b to 18d9b92CompareJuly 20, 2026 04:40

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #2

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #3

@argszero
argszero merged commit 426a1be into masterJul 20, 2026
1 check passed
@argszero
argszero deleted the fix/evolution-cwd-attributeerror branch July 28, 2026 12:00
Sign up for freeto 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.

1 participant

@argszero