Serhiy Storchaka added the comment: It should be "if not basename:". No additional tests are possible except those which added for issue16626. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue16696> _______________________________________