Skip to content

Commit 11b0c1e

Browse files
committed
fix raise
1 parent 28f2730 commit 11b0c1e

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
@@ -29,14 +29,14 @@ def __init__(self, context):
2929
username = context.remote_profile.get('username', None)
3030
password = context.remote_profile.get('password', None)
3131
if email is None and username is not None:
32-
dlog.exception("username is no longer support in current version, "
33-
"please consider use email instead of username.", DeprecationWarning)
32+
raise DeprecationWarning("username is no longer support in current version, "
33+
"please consider use email instead of username.")
3434
if email is None:
3535
raise ValueError("can not find email in remote_profile, please check your machine file.")
3636
if password is None:
3737
raise ValueError("can not find password in remote_profile, please check your machine file.")
3838
if self.api_version == 1:
39-
dlog.exception('api version 1 is deprecated. Use version 2 instead.', DeprecationWarning)
39+
raise DeprecationWarning('api version 1 is deprecated. Use version 2 instead.')
4040
self.api = API(email, password)
4141
self.group_id = None
4242

0 commit comments

Comments
 (0)