Toggle navigation
Toggle navigation
This project
Loading...
Sign in
서승완
/
kappa
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Mitch Garnaat
2015-12-14 00:00:02 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fcdc6f5df2847ca468a898b5a05515f13652f91b
fcdc6f5d
1 parent
ea8a7935
Fix encoding problems.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
kappa/function.py
kappa/policy.py
kappa/function.py
View file @
fcdc6f5
...
...
@@ -137,7 +137,7 @@ class Function(object):
m
=
hashlib
.
md5
()
with
open
(
self
.
zipfile_name
,
'rb'
)
as
fp
:
m
.
update
(
fp
.
read
())
zip_md5
=
m
.
hexdigest
()
zip_md5
=
m
.
hexdigest
()
.
encode
(
'utf-8'
)
cached_md5
=
self
.
_context
.
get_cache_value
(
'zip_md5'
)
LOG
.
debug
(
'zip_md5:
%
s'
,
zip_md5
)
LOG
.
debug
(
'cached md5:
%
s'
,
cached_md5
)
...
...
@@ -158,7 +158,7 @@ class Function(object):
m
.
update
(
str
(
self
.
memory_size
))
m
.
update
(
self
.
_context
.
exec_role_arn
)
m
.
update
(
str
(
self
.
timeout
))
config_md5
=
m
.
hexdigest
()
config_md5
=
m
.
hexdigest
()
.
encode
(
'utf-8'
)
cached_md5
=
self
.
_context
.
get_cache_value
(
'config_md5'
)
LOG
.
debug
(
'config_md5:
%
s'
,
config_md5
)
LOG
.
debug
(
'cached_md5:
%
s'
,
cached_md5
)
...
...
kappa/policy.py
View file @
fcdc6f5
...
...
@@ -125,7 +125,7 @@ class Policy(object):
def
_check_md5
(
self
,
document
):
m
=
hashlib
.
md5
()
m
.
update
(
document
.
encode
(
'utf-8'
))
policy_md5
=
m
.
hexdigest
()
policy_md5
=
m
.
hexdigest
()
.
encode
(
'utf-8'
)
cached_md5
=
self
.
_context
.
get_cache_value
(
'policy_md5'
)
LOG
.
debug
(
'policy_md5:
%
s'
,
policy_md5
)
LOG
.
debug
(
'cached md5:
%
s'
,
cached_md5
)
...
...
Please
register
or
login
to post a comment