Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
a2e14c11
Commit
a2e14c11
authored
Jul 08, 2018
by
lamby
Browse files
Add a wrapper around Liferea to display a deprecation warning. (
#11082
)
parent
06e1f3a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/chroot_local-includes/usr/local/bin/liferea
0 → 100755
View file @
a2e14c11
#!/usr/bin/env python3
"""
Tails Liferea wrapper
"""
import
os
import
sh
import
sys
from
gettext
import
gettext
LIFEREA
=
'/usr/bin/liferea'
os
.
environ
[
'TEXTDOMAIN'
]
=
'tails'
def
main
():
disabled_text
=
gettext
(
'Liferea is deprecated'
)
question_text
=
gettext
(
'Do you wish to start Liferea anyway?'
)
warning_text
=
gettext
(
"Due to security concerns the Liferea RSS reader from a future "
"version of Tails. Please migrate your feeds to Thunderbird."
)
dialog_msg
=
'<b><big>{}</big></b>
\n\n
{}
\n\n
{}
\n
'
.
format
(
disabled_text
,
warning_text
,
question_text
,
)
exit_text
=
gettext
(
'_Exit'
)
launch_text
=
gettext
(
'_Launch'
)
# results 0 == True; 1 == False; 5 == Timeout
results
=
sh
.
zenity
(
'--question'
,
'--title'
,
''
,
'--default-cancel'
,
'--ok-label'
,
launch_text
,
'--cancel-label'
,
exit_text
,
'--text'
,
dialog_msg
,
_ok_code
=
[
0
,
1
,
5
],
)
if
results
.
exit_code
!=
0
:
return
1
return
os
.
execv
(
LIFEREA
,
[
LIFEREA
]
+
sys
.
argv
[
1
:])
if
__name__
==
'__main__'
:
sys
.
exit
(
main
(
*
sys
.
argv
[
1
:]))
Write
Preview
Supports
Markdown
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