mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-08 12:08:14 -05:00
Revert the changes done for removing support for Python 3.7
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
|
||||
import json
|
||||
|
||||
from unicodedata import normalize, is_normalized
|
||||
import sys
|
||||
if sys.version_info >= (3, 8):
|
||||
from unicodedata import normalize, is_normalized
|
||||
|
||||
from flask import render_template, request, \
|
||||
Response, abort, current_app, session
|
||||
@@ -444,6 +446,10 @@ def normalise_password(password):
|
||||
'NFKD'
|
||||
)
|
||||
|
||||
# Remove check of Python version once Python 3.7 support ends
|
||||
if sys.version_info < (3, 8):
|
||||
return password
|
||||
|
||||
return password if is_normalized(normalise_form, password) else\
|
||||
normalize(normalise_form, password)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user