Custom error message in authorizor::has_perm?

5 views
Skip to first unread message

Brian Rak

unread,
Aug 1, 2011, 10:21:31 AM8/1/11
to Python FTP server library - Discussion group
Is there any way to return a custom error message from the has_perm
function? I'd like to either change the text after the 550 error, or
print another line containing an extra message. Would any of this be
easily possible, without rewriting the found_terminator function?

Giampaolo Rodolà

unread,
Aug 1, 2011, 10:47:44 AM8/1/11
to pyft...@googlegroups.com
Not at the moment.
Btw, found_terminator() method is way too long and contains a lot of application logic.
It should be refactored and split into different sub-methods so that they can be overriden to cover use cases such as yours.
I'll see whether I can include something like this into 0.6.1 version.

G.
Reply all
Reply to author
Forward
0 new messages