Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
updater
supervisor
Commits
854fa80e
Verified
Commit
854fa80e
authored
Aug 15, 2022
by
Martin Matějek
Browse files
wip: cleanup and minor refactoring
parent
4e2de204
Changes
2
Hide whitespace changes
Inline
Side-by-side
svupdater/approvals.py
View file @
854fa80e
"""Access and control functions of update approvals."""
import
datetime
import
os
import
time
import
typing
...
...
svupdater/notify.py
View file @
854fa80e
...
...
@@ -131,6 +131,10 @@ def changes():
def
approval
():
"""Send notification about approval request."""
apprv
=
approvals
.
current
()
if
apprv
is
None
:
# TODO: Is it ok to just return?
return
changelist
=
""
for
pkg
in
apprv
[
"plan"
]:
changelist
+=
f
"
\n
•
{
pkg
[
'op'
].
title
()
}
{
pkg
[
'name'
]
}
{
''
if
pkg
[
'new_ver'
]
is
None
else
pkg
[
'new_ver'
]
}
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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