Skip to content

fix(main): replace recursion with return, add input validation#237

Open
tatenda-source wants to merge 1 commit into
FujiwaraChoki:mainfrom
tatenda-source:fix/main-recursion-input-validation
Open

fix(main): replace recursion with return, add input validation#237
tatenda-source wants to merge 1 commit into
FujiwaraChoki:mainfrom
tatenda-source:fix/main-recursion-input-validation

Conversation

@tatenda-source
Copy link
Copy Markdown

Summary

  • Replace infinite main() recursion with return on invalid input
  • Wrap int(question(...)) calls in try/except ValueError
  • Use sys.executable instead of hardcoded "python" for cron subprocess
  • Validate account exists before use in affiliate marketing flow
  • Fix incorrect error() calls passing "red" as second arg

Closes #223

Test plan

  • Run python src/main.py and enter non-numeric input at menus
  • Select invalid account numbers and verify graceful handling
  • Test affiliate marketing flow with non-existent Twitter UUID

🤖 Generated with Claude Code

…ate accounts

Closes FujiwaraChoki#223

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

fix(main): infinite recursion and missing input validation

1 participant