mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
fix notification message generation
This commit is contained in:
parent
2c5b9ccb28
commit
c4be566662
1 changed files with 4 additions and 3 deletions
|
@ -178,9 +178,10 @@ class RepoMan:
|
||||||
def _new_notification_msg(self):
|
def _new_notification_msg(self):
|
||||||
s = 'update'
|
s = 'update'
|
||||||
t = str(int(time.time()))
|
t = str(int(time.time()))
|
||||||
part1 = s + '|' + t
|
data = s + '|' + t
|
||||||
part2 = hashlib.sha1(part1.encode('utf-8')).hexdigest()
|
hashing = data + self._notification_secret
|
||||||
msg = part1 + '|' + part2
|
sig = hashlib.sha1(hashing.encode('utf-8')).hexdigest()
|
||||||
|
msg = data + '|' + sig
|
||||||
logger.info('new notification msg: %s.', msg)
|
logger.info('new notification msg: %s.', msg)
|
||||||
return msg.encode('utf-8')
|
return msg.encode('utf-8')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue