This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, koobs, r.david.murray, serhiy.storchaka, skrah
Date 2017-09-29.07:17:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506669451.34.0.213398074469.issue31627@psf.upfronthosting.co.za>
In-reply-to
Content
On just installed FreeBSD the hostname is empty. This causes a failure of test_mailbox.

======================================================================
FAIL: test_create_tmp (test.test_mailbox.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/serhiy/py/cpython3.7-debug/Lib/test/test_mailbox.py", line 758, in test_create_tmp
    self.assertIsNotNone(match, "Invalid file name: '%s'" % tail)
AssertionError: unexpectedly None : Invalid file name: '1506668827.M125806P21276Q34.'

----------------------------------------------------------------------

Changing the "+" qualifier to the "*" qualifier in the regex pattern fixes the issue.

         pattern = re.compile(r"(?P<time>\d+)\.M(?P<M>\d{1,6})P(?P<P>\d+)"
-                             r"Q(?P<Q>\d+)\.(?P<host>[^:/]+)")
+                             r"Q(?P<Q>\d+)\.(?P<host>[^:/]*)")
History
Date User Action Args
2017-09-29 07:17:31serhiy.storchakasetrecipients: + serhiy.storchaka, barry, r.david.murray, skrah, koobs
2017-09-29 07:17:31serhiy.storchakasetmessageid: <1506669451.34.0.213398074469.issue31627@psf.upfronthosting.co.za>
2017-09-29 07:17:31serhiy.storchakalinkissue31627 messages
2017-09-29 07:17:30serhiy.storchakacreate