35f15db30a
Python 2 is EOL sice 2020 [1], it's still available on distros, but may not be installed by default (as being replaced by python3). Thus remove compatibility imports: from __future__ import print_function from __future__ import absolute_import Tested with python3 -m py_compile. [1] https://www.python.org/doc/sunset-python-2/ Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
15 lines
289 B
Python
15 lines
289 B
Python
#!/usr/bin/env python3
|
|
"""A simple test that uses python-gobject to find the path of sh."""
|
|
from gi.repository import GLib
|
|
|
|
|
|
def main():
|
|
sh_path = GLib.find_program_in_path('sh')
|
|
if sh_path == "/bin/sh":
|
|
return True
|
|
return False
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|