Skip to content

Commit

Permalink
Merge pull request #1146 from stefanor/python3.13
Browse files Browse the repository at this point in the history
Remove get_password_hash, unused
  • Loading branch information
moreati authored Oct 9, 2024
2 parents e3b16d6 + 34d441f commit e2c112d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions examples/the_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import hashlib
import io
import os
import spwd

import mitogen.core
import mitogen.master
Expand Down Expand Up @@ -57,21 +56,6 @@ def streamy_download_file(context, path):
}


def get_password_hash(username):
"""
Fetch a user's password hash.
"""
try:
h = spwd.getspnam(username)
except KeyError:
return None

# mitogen.core.Secret() is a Unicode subclass with a repr() that hides the
# secret data. This keeps secret stuff out of logs. Like blobs, secrets can
# also be serialized.
return mitogen.core.Secret(h)


def md5sum(path):
"""
Return the MD5 checksum for a file.
Expand Down

0 comments on commit e2c112d

Please sign in to comment.