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
a9798bfe
Commit
a9798bfe
authored
17 years ago
by
Bryan Tong Minh
Browse files
Options
Downloads
Patches
Plain Diff
Don't init if we're going to login anyway
parent
2b94cc9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mwclient/ex.py
+10
-11
10 additions, 11 deletions
mwclient/ex.py
with
10 additions
and
11 deletions
mwclient/ex.py
+
10
−
11
View file @
a9798bfe
...
@@ -36,15 +36,15 @@ class ConfiguredSite(client.Site):
...
@@ -36,15 +36,15 @@ class ConfiguredSite(client.Site):
if
'
name
'
in
kwargs
:
if
'
name
'
in
kwargs
:
self
.
config
.
update
(
self
.
config
[
'
sites
'
][
kwargs
[
'
name
'
]])
self
.
config
.
update
(
self
.
config
[
'
sites
'
][
kwargs
[
'
name
'
]])
retry_timeout
=
self
.
config
.
get
(
'
retry_timeout
'
,
30
)
do_login
=
'
username
'
in
self
.
config
and
'
password
'
in
self
.
config
max_retries
=
self
.
config
.
get
(
'
max_retries
'
,
-
1
)
client
.
Site
.
__init__
(
self
,
self
.
config
[
'
host
'
],
client
.
Site
.
__init__
(
self
,
self
.
config
[
'
host
'
],
self
.
config
[
'
path
'
],
retry_timeout
=
retry_timeout
,
self
.
config
[
'
path
'
],
do_init
=
not
do_login
,
max_retries
=
max_retries
)
retry_timeout
=
self
.
config
.
get
(
'
retry_timeout
'
,
30
),
max_retries
=
self
.
config
.
get
(
'
max_retries
'
,
-
1
))
if
'
username
'
in
self
.
config
and
'
password
'
in
self
.
config
:
if
do_login
:
self
.
login
(
self
.
config
[
'
username
'
],
self
.
login
(
self
.
config
[
'
username
'
],
self
.
config
[
'
password
'
])
self
.
config
[
'
password
'
])
...
@@ -61,14 +61,13 @@ class ConfiguredPool(list):
...
@@ -61,14 +61,13 @@ class ConfiguredPool(list):
cfg
.
update
(
site
)
cfg
.
update
(
site
)
site
.
update
(
cfg
)
site
.
update
(
cfg
)
retry_timeout
=
site
.
get
(
'
retry_timeout
'
,
30
)
do_login
=
'
username
'
in
site
and
'
password
'
in
site
max_retries
=
site
.
get
(
'
max_retries
'
,
-
1
)
self
.
append
(
client
.
Site
(
site
[
'
host
'
],
self
.
append
(
client
.
Site
(
site
[
'
host
'
],
site
[
'
path
'
],
self
.
pool
,
site
[
'
path
'
],
self
.
pool
,
do_init
=
not
do_login
,
retry_timeout
=
retry_timeout
,
retry_timeout
=
site
.
get
(
'
retry_timeout
'
,
30
)
,
max_retries
=
max_retries
))
max_retries
=
site
.
get
(
'
max_retries
'
,
-
1
)
))
if
'
username
'
in
site
and
'
password
'
in
site
:
if
do_login
:
self
[
-
1
].
login
(
site
[
'
username
'
],
site
[
'
password
'
])
self
[
-
1
].
login
(
site
[
'
username
'
],
site
[
'
password
'
])
self
[
-
1
].
config
=
site
self
[
-
1
].
config
=
site
...
...
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