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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
641a50b1
Commit
641a50b1
authored
Oct 04, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Jul 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! py2/py3: string.letters is locale-dependent and removed in Python 3.
parent
00f47986
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testSessionTool.py
...mplateItem/portal_components/test.erp5.testSessionTool.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateRandomString.py
...eItem/portal_skins/erp5_core/Base_generateRandomString.py
+2
-2
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testSessionTool.py
View file @
641a50b1
...
@@ -30,7 +30,7 @@ import unittest
...
@@ -30,7 +30,7 @@ import unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
erp5.component.tool.SessionTool
import
SESSION_CACHE_FACTORY
from
erp5.component.tool.SessionTool
import
SESSION_CACHE_FACTORY
from
string
import
letters
as
LETTERS
from
string
import
ascii_
letters
as
LETTERS
from
random
import
choice
from
random
import
choice
import
time
import
time
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateRandomString.py
View file @
641a50b1
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
"""
"""
from
random
import
choice
from
random
import
choice
from
string
import
letters
,
digits
from
string
import
ascii_
letters
,
digits
character_set
=
''
character_set
=
''
if
include_letters
:
if
include_letters
:
character_set
=
'%s%s'
%
(
character_set
,
letters
)
character_set
=
'%s%s'
%
(
character_set
,
ascii_
letters
)
if
include_digits
:
if
include_digits
:
character_set
=
'%s%s'
%
(
character_set
,
digits
)
character_set
=
'%s%s'
%
(
character_set
,
digits
)
return
''
.
join
([
choice
(
character_set
)
for
_
in
range
(
int
(
string_length
))])
return
''
.
join
([
choice
(
character_set
)
for
_
in
range
(
int
(
string_length
))])
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