Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.backend.python
Commits
20640053
Commit
20640053
authored
Oct 23, 2019
by
André Anjos
💬
Browse files
Merge branch 'fix_asset_hash_generation' into 'master'
[utils] Fix hash generated by storage classes See merge request
!64
parents
6b4b1ec4
611c1515
Pipeline
#34644
passed with stages
in 4 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/backend/python/utils.py
View file @
20640053
...
...
@@ -333,17 +333,13 @@ class CodeStorage(AbstractStorage):
def
hash
(
self
):
"""Re-imp"""
declaration_hash
=
hash
.
hashJSONFile
(
self
.
json
.
path
,
"description"
)
if
self
.
code
.
exists
():
return
hash
.
hash
(
dict
(
json
=
hash
.
hashJSONFile
(
self
.
json
.
path
,
"description"
),
code
=
hash
.
hashFileContents
(
self
.
code
.
path
),
)
)
code_hash
=
hash
.
hashFileContents
(
self
.
code
.
path
)
return
hash
.
hash
(
dict
(
declaration
=
declaration_hash
,
code
=
code_hash
))
else
:
return
hash
.
hash
(
dict
(
json
=
hash
.
hashJSONFile
(
self
.
json
.
path
,
"description"
))
)
return
declaration_hash
def
exists
(
self
):
"""Re-imp"""
...
...
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