Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mwclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WebU
shared
mwclient
Commits
a9d4c199
Commit
a9d4c199
authored
15 years ago
by
Bryan Tong Minh
Browse files
Options
Downloads
Patches
Plain Diff
Added domain parameter to login
parent
8229965d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mwclient/RELEASE-NOTES.txt
+1
-1
1 addition, 1 deletion
mwclient/RELEASE-NOTES.txt
mwclient/client.py
+6
-3
6 additions, 3 deletions
mwclient/client.py
with
7 additions
and
4 deletions
mwclient/RELEASE-NOTES.txt
+
1
−
1
View file @
a9d4c199
...
@@ -4,7 +4,7 @@ This is mwclient 0.6.3. The following are the release notes for this version.
...
@@ -4,7 +4,7 @@ This is mwclient 0.6.3. The following are the release notes for this version.
== Changes in version 0.6.3 ==
== Changes in version 0.6.3 ==
Mwclient 0.6.3 is unreleased.
Mwclient 0.6.3 is unreleased.
*
No changes yet
.
*
Added domain parameter to login
.
== Changes in version 0.6.2 ==
== Changes in version 0.6.2 ==
Mwclient was released on 2 May 2009.
Mwclient was released on 2 May 2009.
...
...
This diff is collapsed.
Click to expand it.
mwclient/client.py
+
6
−
3
View file @
a9d4c199
...
@@ -274,11 +274,11 @@ class Site(object):
...
@@ -274,11 +274,11 @@ class Site(object):
raise
errors
.
EmailError
,
data
raise
errors
.
EmailError
,
data
def
login
(
self
,
username
=
None
,
password
=
None
,
cookies
=
None
):
def
login
(
self
,
username
=
None
,
password
=
None
,
cookies
=
None
,
domain
=
None
):
if
self
.
initialized
:
self
.
require
(
1
,
10
)
if
self
.
initialized
:
self
.
require
(
1
,
10
)
if
username
and
password
:
if
username
and
password
:
self
.
credentials
=
(
username
,
password
)
self
.
credentials
=
(
username
,
password
,
domain
)
if
cookies
:
if
cookies
:
if
self
.
host
not
in
self
.
conn
.
cookies
:
if
self
.
host
not
in
self
.
conn
.
cookies
:
self
.
conn
.
cookies
[
self
.
host
]
=
http
.
CookieJar
()
self
.
conn
.
cookies
[
self
.
host
]
=
http
.
CookieJar
()
...
@@ -287,7 +287,10 @@ class Site(object):
...
@@ -287,7 +287,10 @@ class Site(object):
if
self
.
credentials
:
if
self
.
credentials
:
wait_token
=
self
.
wait_token
()
wait_token
=
self
.
wait_token
()
while
True
:
while
True
:
login
=
self
.
api
(
'
login
'
,
lgname
=
self
.
credentials
[
0
],
lgpassword
=
self
.
credentials
[
1
])
if
self
.
credentials
[
2
]:
login
=
self
.
api
(
'
login
'
,
lgname
=
self
.
credentials
[
0
],
lgpassword
=
self
.
credentials
[
1
],
lgdomain
=
self
.
credentials
[
2
])
else
:
login
=
self
.
api
(
'
login
'
,
lgname
=
self
.
credentials
[
0
],
lgpassword
=
self
.
credentials
[
1
])
if
login
[
'
login
'
][
'
result
'
]
==
'
Success
'
:
if
login
[
'
login
'
][
'
result
'
]
==
'
Success
'
:
break
break
elif
login
[
'
login
'
][
'
result
'
]
==
'
Throttled
'
:
elif
login
[
'
login
'
][
'
result
'
]
==
'
Throttled
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment