Disable systemd-run if the command is not found. diff -ru xpra-4.2~/xpra/scripts/main.py xpra-4.2/xpra/scripts/main.py --- xpra-4.2~/xpra/scripts/main.py 2021-06-06 08:51:13.756815842 -0700 +++ xpra-4.2/xpra/scripts/main.py 2021-06-06 16:07:13.371024486 -0700 @@ -331,23 +331,26 @@ if not is_systemd_pid1(): return False # pragma: no cover #test it: - cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] - proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) try: - proc.communicate(timeout=2) - r = proc.returncode - except TimeoutExpired: # pragma: no cover - r = None - if r is None: + cmd = ["systemd-run", "--quiet", "--user", "--scope", "--", "true"] + proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=False) try: - proc.terminate() - except Exception: - pass - try: - proc.communicate(timeout=1) + proc.communicate(timeout=2) + r = proc.returncode except TimeoutExpired: # pragma: no cover r = None - return r==0 + if r is None: + try: + proc.terminate() + except Exception: + pass + try: + proc.communicate(timeout=1) + except TimeoutExpired: # pragma: no cover + r = None + return r==0 + except FileNotFoundError: + return False def run_mode(script_file, error_cb, options, args, mode, defaults): d3887303e260aba433dd1ef'>diff
path: root/gnu/packages/datastructures.scm
AgeCommit message (Expand)Author
2017-06-15gnu: liburcu: Update to 0.10.0....* gnu/packages/databases.scm (liburcu): Update to 0.10.0. Tobias Geerinckx-Rice
2017-04-17gnu: Fix typos in descriptions....* gnu/packages/admin.scm (di)[description]: Likewise. * gnu/packages/bioinformatics.scm (r-annotate)[description]: Likewise. * gnu/packages/datastructures.scm (sparsehash)[description]: Likewise. * gnu/packages/dns.scm (knot)[description]: Likewise. * gnu/packages/emacs.scm (emacs-idle-highlight)[synopsis, description]: Likewise. * gnu/packages/gnome.scm (libpeas)[description]: Likewise. * gnu/packages/gtk.scm (python2-pygtk)[description]: Likewise. * gnu/packages/kde-frameworks.scm (kactivities)[description]: Fix typo. * gnu/packages/libevent.scm (perl-anyevent)[description]: Likewise. * gnu/packages/machine-learning.scm (ghmm)[description]: Likewise. * gnu/packages/mail.scm (mlmmj)[description]: Likewise. * gnu/packages/maths.scm (vc)[description]: Likewise. * gnu/packages/music.scm (gx-super-fuzz-lv2)[description]: Likewise. * gnu/packages/networking.scm (nload)[description]: Likewise. * gnu/packages/python.scm (python-execnet)[description]: Likewise. * gnu/packages/terminals.scm (tilda)[description]: Likewise. * gnu/packages/python.scm (python-execnet, python-tables) (python2-coverage-test-runner, python2-rope)[description]: Likewise. Tobias Geerinckx-Rice
2017-03-17gnu: Add liburcu....* gnu/packages/datastructures.scm (liburcu): New variable. Tobias Geerinckx-Rice
2016-07-19gnu: Add ssdeep....* gnu/packages/datastructures.scm (ssdeep): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Tobias Geerinckx-Rice
2016-03-01gnu: Add gdsl....* gnu/packages/datastructures.scm (gdsl): New variable. Ricardo Wurmus
2015-12-11gnu: Move sparsehash to datastructures module....* gnu/packages/crypto.scm (sparsehash): Move variable to... * gnu/packages/datastructures.scm: ...new file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. Ricardo Wurmus