Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
9e8f733f
Commit
9e8f733f
authored
Sep 26, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
6e00ebba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
script/sdk_manager.py
+6
-6
No files found.
script/sdk_manager.py
View file @
9e8f733f
...
...
@@ -13,20 +13,20 @@ def close_sdk(path, sdk):
with
open
(
path
,
"w"
,
encoding
=
"utf-8"
)
as
f_w
:
is_sdk_code
=
False
for
line
in
lines
:
if
"//SDK-"
+
sdk
+
"-END"
in
line
or
"<!--SDK-"
+
sdk
+
"-END-->"
in
line
:
is_sdk_code
=
False
java_mark
=
"//SDK-"
+
sdk
+
"-CODE ->"
;
xml_mark
=
"<!--SDK-"
+
sdk
+
"-CODE//"
;
if
path
.
endswith
(
".java"
)
and
is_sdk_code
and
java_mark
not
in
line
:
line
=
java_mark
+
line
if
path
.
endswith
(
".xml"
)
and
is_sdk_code
and
xml_mark
not
in
line
:
line
=
xml_mark
+
line
.
replace
(
"
\n
"
,
"-->
\n
"
)
line
=
xml_mark
+
line
.
replace
(
"
\n
"
,
"
//
-->
\n
"
)
if
"//SDK-"
+
sdk
+
"-START"
in
line
or
"<--SDK-"
+
sdk
+
"-START-->"
in
line
:
if
"//SDK-"
+
sdk
+
"-START"
in
line
or
"<
!
--SDK-"
+
sdk
+
"-START-->"
in
line
:
is_sdk_code
=
True
if
"//SDK-"
+
sdk
+
"-END"
in
line
or
"<--SDK-"
+
sdk
+
"-START-->"
in
line
:
is_sdk_code
=
False
f_w
.
write
(
line
)
return
...
...
@@ -42,7 +42,7 @@ def open_sdk(path, sdk):
if
code_mark
in
line
:
line
=
line
.
replace
(
code_mark
,
""
)
if
xml_mark
in
line
:
line
=
line
.
replace
(
xml_mark
,
""
)
.
replace
(
"-->"
,
""
)
line
=
line
.
replace
(
xml_mark
,
""
)
.
replace
(
"
//
-->"
,
""
)
f_w
.
write
(
line
)
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment