Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
b7c72294
Verified
Commit
b7c72294
authored
5 years ago
by
Nicolas KAROLAK
Browse files
Options
Downloads
Patches
Plain Diff
handle EMAIL_SMTP_SERVER host:port notation
parent
83c9e25a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_email.py
+8
-3
8 additions, 3 deletions
tests/test_email.py
with
8 additions
and
3 deletions
tests/test_email.py
+
8
−
3
View file @
b7c72294
...
@@ -210,9 +210,14 @@ def main():
...
@@ -210,9 +210,14 @@ def main():
# get settings
# get settings
conf
=
u
.
load_conf
()
conf
=
u
.
load_conf
()
relay
=
conf
.
get
(
"
EMAIL_SMTP_SERVER
"
,
""
).
replace
(
"
[
"
,
""
).
replace
(
"
]
"
,
""
)
relay_host
=
(
conf
.
get
(
"
EMAIL_SMTP_SERVER
"
,
""
)
.
replace
(
"
[
"
,
""
)
.
replace
(
"
]
"
,
""
)
.
split
(
"
:
"
)[
0
]
)
ip_addr
=
(
ip_addr
=
(
(
socket
.
gethostbyname
(
relay
)
if
relay
else
None
)
(
socket
.
gethostbyname
(
relay
_host
)
if
relay
_host
else
None
)
or
conf
.
get
(
"
NETWORK_IP_NAT
"
)
or
conf
.
get
(
"
NETWORK_IP_NAT
"
)
or
conf
.
get
(
"
NETWORK_IP
"
)
or
conf
.
get
(
"
NETWORK_IP
"
)
or
u
.
get_ip
()
or
u
.
get_ip
()
...
@@ -230,7 +235,7 @@ def main():
...
@@ -230,7 +235,7 @@ def main():
errors
+=
check_err
if
check_err
else
errors
errors
+=
check_err
if
check_err
else
errors
# check that relayhost is correct
# check that relayhost is correct
check_warn
,
check_err
=
check_relay
(
relay
,
domain
)
check_warn
,
check_err
=
check_relay
(
relay
_host
,
domain
)
warnings
+=
check_warn
if
check_warn
else
warnings
warnings
+=
check_warn
if
check_warn
else
warnings
errors
+=
check_err
if
check_err
else
errors
errors
+=
check_err
if
check_err
else
errors
...
...
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