def handle_noargs(self, **options):

        if not settings.PWD_ALGORITHM == 'bcrypt':
            return

        for user in User.objects.all():
            pwd = user.password
            if pwd.startswith('hh$') or pwd.startswith('bcrypt$'):
                continue  # Password has already been strengthened.

            try:
                alg, salt, hash = pwd.split('$')
            except __HOLE__:
                continue  # Probably not a password we understand.

            bc_value = bcrypt_auth.create_hash(pwd)
            # 'hh' stands for 'hardened hash'.
            new_password = '$'.join(['hh', alg, salt, bc_value])
            user.password = new_password
            user.save()
dataset/ETHPy150Open fwenzel/django-sha2/django_sha2/management/commands/strengthen_user_passwords.py/Command.handle_noargs