Commit Graph
9 Commits
Author SHA1 Message Date
5de069eb88 Drop the duplicate DB save that crashed --submit --db (#3122)
The save at the end of Submitter.dialog read self.args.db, an attribute
argparse never creates: maigret.py declares --db with dest="db_file", and
the line right above it in the same block already reads self.args.db_file.

So `maigret --submit <url> --db custom.json` ran the whole interactive
dialog and then raised AttributeError on the final step. dialog() never
returned True, so main() never reached save_db_safely() either, and the
newly submitted site was lost after every question had been answered. The
default path was unaffected, because the block is guarded by
`db_file != settings.sites_db_path`.

Removing the block rather than renaming the attribute: main() already
persists the database after a successful submit, through
save_db_safely(db, db_file, logger). That call takes its path from
resolve_db_path(), which returns an absolute or module-relative path for a
custom --db, so the removed line could have written to a different file
than the rest of the run uses. save_db_safely also tolerates a read-only
installation, which db.save_to_file() does not.

The existing dialog tests pass a MagicMock, which answers to any attribute
name, so the typo was invisible to them. The new test builds its namespace
with the real parser.

Co-authored-by: datrixlab <325650023+datrixlab@users.noreply.github.com>
2026-10-04 19:49:32 +05:00
Mayukh BandyopadhyayandGitHub 6cab6b9f98 Respect --dns-resolver in --self-check and --submit (#3026) 2026-08-31 10:21:00 +02:00
Julio César SuásteguiandGitHub af3de564c7 Detect status-code checks in --submit fallback (#3024)
Completes subtask 2 of #2668. When manual feature detection sees a claimed profile return 2xx and the unclaimed profile return 4xx, --submit creates a status_code check. Redirects keep the message fallback.
2026-08-27 12:02:52 +02:00
felipeandGitHub 77b565cfd5 fix: normalize SOCKS5 proxy scheme per HTTP transport (#2955) (#2966) 2026-08-12 17:04:32 +02:00
SoxojandGitHub d136014576 Multiple lint and types fixes (#2454) 2026-04-02 21:01:49 +02:00
CopilotGitHubsoxojcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
abd9aa57fe Fix domain substring matching and NoneType crash in submit dialog (#2367)
* Initial plan

* Fix domain matching and NoneType error in submit.py

- Use regex with domain boundary matching instead of substring matching
  to prevent x.com from matching 500px.com, mix.com, etc.
- Handle None old_site gracefully when user enters a site name not in
  the matched list, fixing AttributeError crash.
- Add tests for both fixes.

Co-authored-by: soxoj <31013580+soxoj@users.noreply.github.com>
Agent-Logs-Url: https://github.com/soxoj/maigret/sessions/7eabc755-47fd-4b80-a38c-9d6c056c2ce9

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: soxoj <31013580+soxoj@users.noreply.github.com>
2026-03-24 22:04:10 +01:00
SoxojandGitHub 5e88fd9ba8 Fixed test dialog_adds_site_negative (#2107) 2025-08-10 12:44:05 +02:00
SoxojandGitHub 97e5f600d0 Async generator-executor for site checks (#1978) 2024-12-17 22:48:11 +01:00
SoxojandGitHub 81a817a39f Improved "submit new site" mode, added tests, fixed top-500 sites (#1952) 2024-12-10 18:02:43 +01:00