소스 검색

Add DeprecationWarning for auth

master
JustAnotherArchivist 2 년 전
부모
커밋
454b9acc2d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      http2irc.py

+ 2
- 0
http2irc.py 파일 보기

@@ -19,6 +19,7 @@ import string
import sys
import time
import toml
import warnings


logger = logging.getLogger('http2irc')
@@ -184,6 +185,7 @@ class Config(dict):
if 'auth' in map_:
if 'postauth' in map_:
raise InvalidConfig(f'auth and postauth are aliases and cannot be used together')
warnings.warn('auth is deprecated, use postauth instead', DeprecationWarning)
map_['postauth'] = map_['auth']
del map_['auth']
for k in ('postauth', 'getauth'):


불러오는 중...
취소
저장