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
Levin Zimmermann
erp5
Commits
dcaffa0b
Commit
dcaffa0b
authored
Mar 30, 2022
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
ca2febe1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
31 deletions
+57
-31
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+30
-24
product/ERP5/bin/zopewsgi.py
product/ERP5/bin/zopewsgi.py
+1
-1
product/ERP5Type/dynamic/portal_type_class.py
product/ERP5Type/dynamic/portal_type_class.py
+5
-1
product/ERP5Type/patches/ppml.py
product/ERP5Type/patches/ppml.py
+21
-5
No files found.
product/ERP5/ERP5Site.py
View file @
dcaffa0b
...
...
@@ -72,6 +72,7 @@ def manage_addERP5SiteForm(*args, **kw):
default_sql_connection_string
=
'test test'
import
pdb
# ERP5Site Constructor
def
manage_addERP5Site
(
self
,
id
,
...
...
@@ -96,30 +97,33 @@ def manage_addERP5Site(self,
'''
Adds a portal instance.
'''
gen
=
ERP5Generator
()
id
=
str
(
id
).
strip
()
p
=
gen
.
create
(
self
,
id
,
create_userfolder
,
erp5_catalog_storage
,
erp5_sql_connection_string
,
cmf_activity_sql_connection_string
,
bt5_repository_url
,
bt5
,
id_store_interval
,
cloudooo_url
,
create_activities
=
create_activities
,
light_install
=
light_install
,
reindex
=
reindex
,
sql_reset
=
sql_reset
)
gen
.
setupDefaultProperties
(
p
,
title
,
description
,
email_from_address
,
email_from_name
,
validate_email
)
if
RESPONSE
is
not
None
:
RESPONSE
.
redirect
(
p
.
absolute_url
())
try
:
gen
=
ERP5Generator
()
id
=
str
(
id
).
strip
()
p
=
gen
.
create
(
self
,
id
,
create_userfolder
,
erp5_catalog_storage
,
erp5_sql_connection_string
,
cmf_activity_sql_connection_string
,
bt5_repository_url
,
bt5
,
id_store_interval
,
cloudooo_url
,
create_activities
=
create_activities
,
light_install
=
light_install
,
reindex
=
reindex
,
sql_reset
=
sql_reset
)
gen
.
setupDefaultProperties
(
p
,
title
,
description
,
email_from_address
,
email_from_name
,
validate_email
)
if
RESPONSE
is
not
None
:
RESPONSE
.
redirect
(
p
.
absolute_url
())
except
:
pdb
.
post_mortem
()
def
getCatalogStorageList
(
*
args
,
**
kw
):
"""
...
...
@@ -2518,6 +2522,8 @@ def initialize(self):
'MySQL error while trying to create ERP5 site. Retrying...'
,
error
=
1
)
time
.
sleep
(
5
)
except
:
import
pdb
;
pdb
.
post_mortem
()
from
Products.TimerService.timerserver.TimerServer
import
TimerRequest
def
traverse
(
*
args
,
**
kw
):
del
TimerRequest
.
traverse
...
...
product/ERP5/bin/zopewsgi.py
View file @
dcaffa0b
...
...
@@ -217,7 +217,7 @@ def runwsgi():
else
:
SignalHandler
.
registerHandler
(
signal
.
SIGTERM
,
sys
.
exit
)
if
args
.
timerserver_interval
:
if
args
.
timerserver_interval
and
False
:
import
Products.TimerService
Products
.
TimerService
.
timerserver
.
TimerServer
.
TimerServer
(
module
=
'Zope2'
,
...
...
product/ERP5Type/dynamic/portal_type_class.py
View file @
dcaffa0b
...
...
@@ -476,7 +476,11 @@ def synchronizeDynamicModules(context, force=False):
migrate
=
True
else
:
continue
tool
.
_bootstrap
()
try
:
tool
.
_bootstrap
()
except
Exception
as
e
:
import
pdb
;
pdb
.
post_mortem
()
raise
tool
.
__class__
=
getattr
(
erp5
.
portal_type
,
tool
.
portal_type
)
# TODO: Create portal_activities here, and even before portal_types:
# - all code in ActiveObject could assume that it always exists
...
...
product/ERP5Type/patches/ppml.py
View file @
dcaffa0b
...
...
@@ -60,7 +60,7 @@ def convert(S):
### [\x00-\x1f] characters will be escaped to make a more
### readable output.
try
:
if
not
isinstance
(
S
,
str
):
if
isinstance
(
S
,
bytes
):
S
.
decode
(
'utf8'
)
except
UnicodeDecodeError
:
return
'base64'
,
base64
.
encodestring
(
S
)[:
-
1
]
...
...
@@ -328,7 +328,8 @@ class NoBlanks(object):
"""
# Ignore element data between elements (eg '<e> <f> </f> </e>')...
if
data
.
strip
():
if
isinstance
(
data
,
str
):
if
isinstance
(
data
,
bytes
):
import
pdb
;
pdb
.
set_trace
()
data
=
data
.
encode
(
'raw_unicode_escape'
)
self
.
append
(
data
)
...
...
@@ -352,7 +353,8 @@ class NoBlanks(object):
self
.
previous_discarded_data
=
None
self
.
previous_stack_end
=
None
if
isinstance
(
data
,
str
):
if
isinstance
(
data
,
bytes
):
import
pdb
;
pdb
.
set_trace
()
data
=
data
.
encode
(
'raw_unicode_escape'
)
self
.
append
(
data
)
...
...
@@ -610,6 +612,7 @@ class ToXMLUnpickler(Unpickler):
dispatch
[
OBJ
]
=
load_obj
def
load_global
(
self
):
# import pdb; pdb.set_trace()
module
=
self
.
readline
()[:
-
1
]
name
=
self
.
readline
()[:
-
1
]
self
.
append
(
Global
(
module
,
name
,
self
.
id_mapping
))
...
...
@@ -681,9 +684,17 @@ def save_string(self, tag, data):
if
l
<
256
:
if
isinstance
(
v
,
str
):
import
pdb
;
pdb
.
set_trace
()
v
=
SHORT_BINSTRING
+
bytes
([
l
])
+
v
if
encoding
==
'base64'
:
op
=
SHORT_BINBYTES
else
:
op
=
SHORT_BINSTRING
v
=
op
+
bytes
([
l
])
+
v
else
:
v
=
BINSTRING
+
struct
.
pack
(
'<i'
,
l
)
+
v
if
encoding
==
'base64'
:
op
=
BINBYTES
else
:
op
=
BINSTRING
v
=
op
+
struct
.
pack
(
'<i'
,
l
)
+
v
else
:
v
=
STRING
+
repr
(
v
)
+
'
\
n
'
return
save_put
(
self
,
v
,
a
)
...
...
@@ -758,6 +769,7 @@ class xmlPickler(NoBlanks, xyap):
if
tag
in
end
:
top
=
end
[
tag
](
self
,
tag
,
top
)
if
isinstance
(
top
,
str
):
import
pdb
;
pdb
.
set_trace
()
top
=
top
.
encode
(
'raw_unicode_escape'
)
append
(
top
)
...
...
@@ -804,6 +816,10 @@ def importXML(jar, file, clue=''):
if
type
(
file
)
is
str
:
file
=
open
(
file
,
'rb'
)
outfile
=
TemporaryFile
()
# def write(*args, **kwargs):
# import pdb; pdb.set_trace()
# return TemporaryFile.write(*args, **kwargs)
# outfile.write = write
data
=
file
.
read
()
F
=
xmlPickler
()
F
.
end_handlers
[
'record'
]
=
save_record
...
...
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