mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
14 lines
457 B
Python
14 lines
457 B
Python
def fix_getpass():
|
|
try:
|
|
import getpass
|
|
except ImportError:
|
|
return #If we can't import it, we can't fix it
|
|
import warnings
|
|
fallback = getattr(getpass, 'fallback_getpass', None) # >= 2.6
|
|
if not fallback:
|
|
fallback = getpass.default_getpass # <= 2.5 @UndefinedVariable
|
|
getpass.getpass = fallback
|
|
if hasattr(getpass, 'GetPassWarning'):
|
|
warnings.simplefilter("ignore", category=getpass.GetPassWarning)
|
|
|