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
Carlos Ramos Carreño
erp5
Commits
207b77e0
Commit
207b77e0
authored
Mar 15, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forge: PY3 support
parent
0543484e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
bt5/erp5_forge/ModuleComponentTemplateItem/portal_components/module.erp5.Git.py
...omponentTemplateItem/portal_components/module.erp5.Git.py
+1
-0
bt5/erp5_forge/ModuleComponentTemplateItem/portal_components/module.erp5.WorkingCopy.py
...TemplateItem/portal_components/module.erp5.WorkingCopy.py
+3
-3
No files found.
bt5/erp5_forge/ModuleComponentTemplateItem/portal_components/module.erp5.Git.py
View file @
207b77e0
...
@@ -64,6 +64,7 @@ class Git(WorkingCopy):
...
@@ -64,6 +64,7 @@ class Git(WorkingCopy):
def
_git
(
self
,
*
args
,
**
kw
):
def
_git
(
self
,
*
args
,
**
kw
):
kw
.
setdefault
(
'cwd'
,
self
.
working_copy
)
kw
.
setdefault
(
'cwd'
,
self
.
working_copy
)
kw
.
setdefault
(
'universal_newlines'
,
True
)
argv
=
[
'git'
]
argv
=
[
'git'
]
try
:
try
:
return
subprocess
.
Popen
(
argv
+
list
(
args
),
**
kw
)
return
subprocess
.
Popen
(
argv
+
list
(
args
),
**
kw
)
...
...
bt5/erp5_forge/ModuleComponentTemplateItem/portal_components/module.erp5.WorkingCopy.py
View file @
207b77e0
...
@@ -139,14 +139,14 @@ class WorkingCopy(six.with_metaclass(WorkingCopyMetaClass, Implicit)):
...
@@ -139,14 +139,14 @@ class WorkingCopy(six.with_metaclass(WorkingCopyMetaClass, Implicit)):
def
_getCookie
(
self
,
name
,
default
=
None
):
def
_getCookie
(
self
,
name
,
default
=
None
):
try
:
try
:
return
json
.
loads
(
b64decode
(
self
.
REQUEST
[
name
]))
return
json
.
loads
(
b64decode
(
self
.
REQUEST
[
name
])
.
decode
()
)
except
StandardError
:
except
Exception
:
return
default
return
default
def
_setCookie
(
self
,
name
,
value
,
days
=
30
):
def
_setCookie
(
self
,
name
,
value
,
days
=
30
):
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
request
=
portal
.
REQUEST
request
=
portal
.
REQUEST
value
=
b64encode
(
json
.
dumps
(
value
))
value
=
b64encode
(
json
.
dumps
(
value
)
.
encode
()).
decode
(
)
request
.
set
(
name
,
value
)
request
.
set
(
name
,
value
)
if
days
:
if
days
:
expires
=
(
DateTime
()
+
days
).
toZone
(
'GMT'
).
rfc822
()
expires
=
(
DateTime
()
+
days
).
toZone
(
'GMT'
).
rfc822
()
...
...
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