Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexander Emmerich
erp5
Commits
f46d70f9
Commit
f46d70f9
authored
Jun 07, 2019
by
Bryton Lacquement
🚪
Committed by
Julien Muchembled
Jun 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: make ActivityTool compatible with WSGI
parent
c33d2d1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+13
-8
No files found.
product/CMFActivity/ActivityTool.py
View file @
f46d70f9
...
...
@@ -134,14 +134,19 @@ def getServerAddress():
global
_server_address
if
_server_address
is
None
:
ip
=
port
=
''
from
asyncore
import
socket_map
for
k
,
v
in
socket_map
.
items
():
if
hasattr
(
v
,
'addr'
):
# see Zope/lib/python/App/ApplicationManager.py: def getServers(self)
type
=
str
(
getattr
(
v
,
'__class__'
,
'unknown'
))
if
type
==
'ZServer.HTTPServer.zhttp_server'
:
ip
,
port
=
v
.
addr
break
try
:
zopewsgi
=
sys
.
modules
[
'Products.ERP5.bin.zopewsgi'
]
except
KeyError
:
from
asyncore
import
socket_map
for
k
,
v
in
socket_map
.
items
():
if
hasattr
(
v
,
'addr'
):
# see Zope/lib/python/App/ApplicationManager.py: def getServers(self)
type
=
str
(
getattr
(
v
,
'__class__'
,
'unknown'
))
if
type
==
'ZServer.HTTPServer.zhttp_server'
:
ip
,
port
=
v
.
addr
break
else
:
ip
,
port
=
zopewsgi
.
server
.
addr
if
ip
==
'0.0.0.0'
:
ip
=
socket
.
gethostbyname
(
socket
.
gethostname
())
_server_address
=
'%s:%s'
%
(
ip
,
port
)
...
...
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