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
Paul Graydon
erp5
Commits
8d2d4c7f
Commit
8d2d4c7f
authored
Apr 02, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fix SyntaxWarning
parent
9b77144e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+9
-9
product/ERP5Type/XMLExportImport/ppml.py
product/ERP5Type/XMLExportImport/ppml.py
+2
-2
No files found.
product/ERP5Type/Base.py
View file @
8d2d4c7f
...
@@ -1014,10 +1014,10 @@ class Base(
...
@@ -1014,10 +1014,10 @@ class Base(
result
=
None
result
=
None
else
:
else
:
if
isinstance
(
value
,
(
list
,
tuple
)):
if
isinstance
(
value
,
(
list
,
tuple
)):
if
len
(
value
)
is
0
:
if
len
(
value
):
result
=
None
else
:
result
=
value
[
0
]
result
=
value
[
0
]
else
:
result
=
None
else
:
else
:
result
=
value
result
=
value
else
:
else
:
...
@@ -1048,10 +1048,10 @@ class Base(
...
@@ -1048,10 +1048,10 @@ class Base(
result
=
None
result
=
None
else
:
else
:
if
isinstance
(
value
,
(
list
,
tuple
)):
if
isinstance
(
value
,
(
list
,
tuple
)):
if
len
(
value
)
is
0
:
if
len
(
value
):
result
=
None
else
:
result
=
value
[
0
]
result
=
value
[
0
]
else
:
result
=
None
else
:
else
:
result
=
value
result
=
value
else
:
else
:
...
@@ -1092,10 +1092,10 @@ class Base(
...
@@ -1092,10 +1092,10 @@ class Base(
result
=
None
result
=
None
else
:
else
:
if
isinstance
(
value
,
(
list
,
tuple
)):
if
isinstance
(
value
,
(
list
,
tuple
)):
if
len
(
value
)
is
0
:
if
len
(
value
):
result
=
None
else
:
result
=
value
[
0
]
result
=
value
[
0
]
else
:
result
=
None
else
:
else
:
result
=
value
result
=
value
else
:
else
:
...
...
product/ERP5Type/XMLExportImport/ppml.py
View file @
8d2d4c7f
...
@@ -900,7 +900,7 @@ def save_bytes(self, tag, data):
...
@@ -900,7 +900,7 @@ def save_bytes(self, tag, data):
v
=
b''
.
join
(
data
[
2
:])
v
=
b''
.
join
(
data
[
2
:])
encoding
=
a
.
get
(
'encoding'
,
'repr'
)
encoding
=
a
.
get
(
'encoding'
,
'repr'
)
assert
encoding
==
'base64'
assert
encoding
==
'base64'
if
encoding
is
not
''
:
if
encoding
!=
''
:
v
=
unconvert
(
encoding
,
v
)
v
=
unconvert
(
encoding
,
v
)
if
self
.
binary
:
if
self
.
binary
:
l
=
len
(
v
)
l
=
len
(
v
)
...
@@ -924,7 +924,7 @@ def save_unicode(self, tag, data):
...
@@ -924,7 +924,7 @@ def save_unicode(self, tag, data):
for
x
in
data
[
2
:]:
for
x
in
data
[
2
:]:
v
=
v
+
x
v
=
v
+
x
encoding
=
a
.
get
(
'encoding'
,
'repr'
)
# JPS: repr is default encoding
encoding
=
a
.
get
(
'encoding'
,
'repr'
)
# JPS: repr is default encoding
if
encoding
is
not
''
:
if
encoding
!=
''
:
v
=
unconvert
(
encoding
,
v
)
v
=
unconvert
(
encoding
,
v
)
if
binary
:
if
binary
:
l
=
len
(
v
)
l
=
len
(
v
)
...
...
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