Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
fumufu86
tower
Commits
e868c375
Commit
e868c375
authored
Mar 28, 2018
by
Aleksey Shirokih
Browse files
Delete property if exists
parent
8af835be
Changes
1
Hide whitespace changes
Inline
Side-by-side
tower/migrations/035_remove_instances.py
View file @
e868c375
...
...
@@ -235,12 +235,15 @@ def migrate(migrator):
del
conf
[
'postgres_user'
]
if
srv
.
service
==
'consul'
:
conf
[
'master_token'
]
=
conf
.
get
(
'token'
,
''
)
del
conf
[
'token'
]
if
'token'
in
conf
:
del
conf
[
'token'
]
if
srv
.
service
==
'nginx'
:
conf
[
'self_signed_cerificate'
]
=
conf
.
get
(
'certificate'
,
True
)
del
conf
[
'certificate'
]
if
'certificate'
in
conf
:
del
conf
[
'certificate'
]
conf
[
'json_logging'
]
=
conf
.
get
(
'logging'
,
False
)
del
conf
[
'logging'
]
if
'logging'
in
conf
:
del
conf
[
'logging'
]
conf
[
"loglevel"
]
=
srv
.
loglevel
srv
.
config
=
json
.
dumps
(
conf
,
sort_keys
=
True
)
srv
.
save
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment