Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1#!/usr/bin/env python 

2# This file is part of Xpra. 

3# Copyright (C) 2016-2019 Antoine Martin <antoine@xpra.org> 

4# Xpra is released under the terms of the GNU GPL v2, or, at your option, any 

5# later version. See the file COPYING for details. 

6 

7from xpra.log import Logger 

8log = Logger("dbus") 

9 

10def dbus_exception_wrap(fn, info="setting up server dbus instance"): 

11 try: 

12 v = fn() 

13 log("dbus_exception_wrap() %s()=%s", fn, v) 

14 return v 

15 except ImportError as e: 

16 log("%s", exc_info=True) 

17 log.error("Error %s:", info) 

18 log.error(" %s", e) 

19 except Exception as e: 

20 log("%s", exc_info=True) 

21 if str(e).find("org.freedesktop.DBus.Error.NoServer")<0: 

22 log.error("dbus server error", exc_info=True) 

23 log.error("Error %s:", info) 

24 #split on ":" unless it is quoted: 

25 tmp = "-XX-"*10 

26 msg = str(e).replace("':'", tmp) 

27 for x in msg.split(":"): 

28 log.error(" %s", x.replace(tmp, "':'").strip()) 

29 return None