Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
klaus_wendelin
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
Eteri
klaus_wendelin
Commits
218c94e6
Commit
218c94e6
authored
Feb 18, 2020
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendelin: make wendelin format checksum compatible with python2 and 3
parent
cb43d637
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/Base_numpyToWendelinData.py
...em/portal_skins/erp5_wendelin/Base_numpyToWendelinData.py
+1
-1
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/Base_wendelinDataToNumpy.py
...em/portal_skins/erp5_wendelin/Base_wendelinDataToNumpy.py
+2
-2
No files found.
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/Base_numpyToWendelinData.py
View file @
218c94e6
...
...
@@ -11,5 +11,5 @@ io.seek(0)
npy_data
=
io
.
read
()
io
.
close
()
crc
=
struct
.
pack
(
'<
i'
,
binascii
.
crc32
(
npy_data
)
)
crc
=
struct
.
pack
(
'<
I'
,
binascii
.
crc32
(
npy_data
)
&
0xffffffff
)
return
b''
.
join
([
MAGIC_HEADER
,
crc
,
npy_data
])
bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/Base_wendelinDataToNumpy.py
View file @
218c94e6
...
...
@@ -16,8 +16,8 @@ major, minor = map(ord, magic_str[-2:]) #python2
assert
major
==
0
and
minor
==
1
# verify crc32 checksum
checksum
=
struct
.
unpack
(
'<
i
'
,
data
[
MAGIC_LEN
:
HEADER_LEN
])[
0
]
assert
checksum
==
binascii
.
crc32
(
data
[
HEADER_LEN
:])
checksum
=
struct
.
unpack
(
'<
I
'
,
data
[
MAGIC_LEN
:
HEADER_LEN
])[
0
]
assert
checksum
==
binascii
.
crc32
(
data
[
HEADER_LEN
:])
&
0xffffffff
io
=
StringIO
()
io
.
write
(
data
[
HEADER_LEN
:])
io
.
seek
(
0
)
...
...
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