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
138
Merge Requests
138
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
5ab00e7f
Commit
5ab00e7f
authored
Oct 04, 2022
by
Kazuhiko Shiozaki
Committed by
Arnaud Fontaine
Jul 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! py2/py3: string.letters is locale-dependent and removed in Python 3.
parent
2c414b17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
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.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateRandomString.py
View file @
5ab00e7f
...
@@ -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