Skip to content

Fix imapfetch to actually use the 'port' argument#468

Open
jimduchek wants to merge 2 commits into
jsuto:masterfrom
jimduchek:imapfetch-port-fix
Open

Fix imapfetch to actually use the 'port' argument#468
jimduchek wants to merge 2 commits into
jsuto:masterfrom
jimduchek:imapfetch-port-fix

Conversation

@jimduchek

Copy link
Copy Markdown

For some reason the -P/port argument is just... not used. Fixed that.

@jimduchek jimduchek requested a review from jsuto as a code owner June 9, 2026 23:16
@jsuto

jsuto commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Can you please fix this error?

  File "/usr/libexec/piler/imapfetch.py", line 237, in <module>
    main()
  File "/usr/libexec/piler/imapfetch.py", line 199, in main
    conn = imaplib.IMAP4_SSL(server, port = port if port is not None else imaplib.IMAP4_PORT_SSL)
                                                    ^^^^
UnboundLocalError: cannot access local variable 'port' where it is not associated with a value

@jsuto jsuto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This part gives an error

@jimduchek

jimduchek commented Jun 11, 2026

Copy link
Copy Markdown
Author

Fixed, will support the format: SERVER:PORT in the db, or fall back to defaults if only SERVER is specified.

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.

2 participants