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
30afbe2a
Commit
30afbe2a
authored
15 years ago
by
Bryan Tong Minh
Browse files
Options
Downloads
Patches
Plain Diff
* Apply edit fix to page_nowriteapi as well
* indent fix in upload.py
parent
fa093f17
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/page_nowriteapi.py
+6
-2
6 additions, 2 deletions
mwclient/page_nowriteapi.py
mwclient/upload.py
+4
-4
4 additions, 4 deletions
mwclient/upload.py
with
10 additions
and
6 deletions
mwclient/page_nowriteapi.py
+
6
−
2
View file @
30afbe2a
...
@@ -12,10 +12,14 @@ class OldPage(object):
...
@@ -12,10 +12,14 @@ class OldPage(object):
data
[
'
wpSummary
'
]
=
summary
data
[
'
wpSummary
'
]
=
summary
data
[
'
wpSave
'
]
=
'
Save page
'
data
[
'
wpSave
'
]
=
'
Save page
'
data
[
'
wpEditToken
'
]
=
self
.
get_token
(
'
edit
'
)
data
[
'
wpEditToken
'
]
=
self
.
get_token
(
'
edit
'
)
if
self
.
edit
_time
:
if
self
.
last_rev
_time
:
data
[
'
wpEdittime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
self
.
edit
_time
)
data
[
'
wpEdittime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
self
.
last_rev
_time
)
else
:
else
:
data
[
'
wpEdittime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
time
.
gmtime
())
data
[
'
wpEdittime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
time
.
gmtime
())
if
self
.
edit_time
:
data
[
'
wpStarttime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
self
.
edit_time
)
else
:
data
[
'
wpStarttime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
time
.
gmtime
())
data
[
'
wpStarttime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
time
.
gmtime
())
data
[
'
wpStarttime
'
]
=
time
.
strftime
(
'
%Y%m%d%H%M%S
'
,
time
.
gmtime
())
if
minor
:
data
[
'
wpMinoredit
'
]
=
'
1
'
if
minor
:
data
[
'
wpMinoredit
'
]
=
'
1
'
...
...
This diff is collapsed.
Click to expand it.
mwclient/upload.py
+
4
−
4
View file @
30afbe2a
...
@@ -84,11 +84,11 @@ class UploadFile(Upload):
...
@@ -84,11 +84,11 @@ class UploadFile(Upload):
elif
self
.
stage
!=
self
.
STAGE_FILE
:
elif
self
.
stage
!=
self
.
STAGE_FILE
:
if
self
.
str_data
is
None
:
if
self
.
str_data
is
None
:
if
self
.
stage
==
self
.
STAGE_FILEHEADER
:
if
self
.
stage
==
self
.
STAGE_FILEHEADER
:
self
.
str_data
=
StringIO
(
self
.
fileheader
)
self
.
str_data
=
StringIO
(
self
.
fileheader
)
elif
self
.
stage
==
self
.
STAGE_POSTDATA
:
elif
self
.
stage
==
self
.
STAGE_POSTDATA
:
self
.
str_data
=
StringIO
(
self
.
postdata
)
self
.
str_data
=
StringIO
(
self
.
postdata
)
elif
self
.
stage
==
self
.
STAGE_FOOTER
:
elif
self
.
stage
==
self
.
STAGE_FOOTER
:
self
.
str_data
=
StringIO
(
self
.
footer
)
self
.
str_data
=
StringIO
(
self
.
footer
)
data
=
self
.
str_data
.
read
(
length
)
data
=
self
.
str_data
.
read
(
length
)
else
:
else
:
if
self
.
length_left
:
if
self
.
length_left
:
...
...
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