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
7c05a14d
Commit
7c05a14d
authored
Jul 15, 2019
by
sikang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.100.14.92:8929/sikang/lib_base
bug fix string 加密
parents
f0b25f8e
932c24bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
script/res/update_gateway.py
+5
-2
No files found.
script/res/update_gateway.py
View file @
7c05a14d
...
@@ -30,7 +30,10 @@ with open(path, "w") as f_w:
...
@@ -30,7 +30,10 @@ with open(path, "w") as f_w:
line
=
"harvest_port=
%
s
\n
"
%
(
gateway
[
'harvester'
][
0
]
.
split
(
":"
)[
2
])
line
=
"harvest_port=
%
s
\n
"
%
(
gateway
[
'harvester'
][
0
]
.
split
(
":"
)[
2
])
elif
"gateway_ip="
in
line
:
elif
"gateway_ip="
in
line
:
line
=
"gateway_ip=
\"
%
s
\"\n
"
%
(
gateway
[
'gateway'
][
1
])
ip
=
gateway
[
'gateway'
][
0
]
if
len
(
gateway
[
'gateway'
])
>
1
:
ip
=
gateway
[
'gateway'
][
1
]
line
=
"gateway_ip=
\"
%
s
\"\n
"
%
(
ip
)
elif
"repayment_h5="
in
line
:
elif
"repayment_h5="
in
line
:
line
=
"repayment_h5=
\"
%
s
\"\n
"
%
(
gateway
[
'repay'
][
0
])
line
=
"repayment_h5=
\"
%
s
\"\n
"
%
(
gateway
[
'repay'
][
0
])
...
@@ -41,7 +44,7 @@ with open(path, "w") as f_w:
...
@@ -41,7 +44,7 @@ with open(path, "w") as f_w:
elif
"agreement_url="
in
line
:
elif
"agreement_url="
in
line
:
line
=
"agreement_url=
\"
%
s
\"\n
"
%
(
gateway
[
'privacy'
][
0
])
line
=
"agreement_url=
\"
%
s
\"\n
"
%
(
gateway
[
'privacy'
][
0
])
elif
"home="
in
line
:
elif
"home="
in
line
and
"home"
in
gateway
.
keys
()
:
line
=
"home=
\"
%
s
\"\n
"
%
(
gateway
[
'home'
][
0
])
line
=
"home=
\"
%
s
\"\n
"
%
(
gateway
[
'home'
][
0
])
f_w
.
write
(
line
)
f_w
.
write
(
line
)
...
...
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