Skip to content

Commit f8b9f37

Browse files
committed
change execption to dlog
1 parent 2ba184f commit f8b9f37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpdispatcher/dp_cloud_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def __init__(self, context):
2626
username = context.remote_profile.get('username', None)
2727
password = context.remote_profile.get('password', None)
2828
if email is None and username is not None:
29-
raise DeprecationWarning("username is no longer support in current version, "
30-
"please consider use email instead of username.")
29+
raise dlog.exception("username is no longer support in current version, "
30+
"please consider use email instead of username.", DeprecationWarning)
3131
if email is None:
3232
raise ValueError("can not find email in remote_profile, please check your machine file.")
3333
if password is None:
3434
raise ValueError("can not find password in remote_profile, please check your machine file.")
3535
if self.api_version == 1:
36-
warnings.warn('api version 1 is deprecated. Use version 2 instead.', DeprecationWarning)
36+
dlog.exception('api version 1 is deprecated. Use version 2 instead.', DeprecationWarning)
3737
self.api = API(email, password)
3838
self.group_id = None
3939

0 commit comments

Comments
 (0)