File: auth_dialog

package info (click to toggle)
xpra 3.1.5%2Bdfsg1-0.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,692 kB
  • sloc: python: 117,045; javascript: 94,780; ansic: 2,843; sh: 939; cpp: 268; makefile: 212; xml: 89
file content (22 lines) | stat: -rwxr-xr-x 671 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python

import os
import sys
try:
    import xpra
    assert xpra
except ImportError as e:
    sys.stderr.write("xpra for python %s is not installed\n" % (".".join(str(x) for x in sys.version_info[:2])))
    if not os.environ.get("XPRA_ALT_PYTHON_RETRY"):
        major = sys.version_info[0]
        other_option = 2+int(major==2)
        env = os.environ.copy()
        env["XPRA_ALT_PYTHON_RETRY"] = "1"
        py_exe = "python%i" % other_option
        argv = [py_exe]+sys.argv
        sys.stderr.write(" retrying with %s\n" % py_exe)
        os.execvpe(py_exe, argv, env)
    sys.exit(1)

from xpra.gtk_common.auth_dialog import main
sys.exit(main())