Apache and nginx actively support 2 or more colon-separated fields in an htpasswd file. But such files break in HtpasswdFile because of this exception. I explained this, and showed evidence from the apache and nginx sorce code, in this bug report on trac: https://trac.edgewall.org/ticket/12744#comment:2. (Sorry, nicely formatted links aren't working with that URL for some reason.)
You mentioned elsewhere that there isn't an official spec for the htpasswd format, which makes it hard to know just what makes an acceptable file. But the source code in both projects makes clear that this is not an accident; additional colon-separated fields are allowed. You could allow this by changing
if len(result) != 2:
if len(result) < 2:
I have not looked at the code for digest, but corresponding changes may be needed there, as Ryan J Ollos suggested on trac.