~ubuntu-branches/ubuntu/quantal/xdiagnose/quantal-proposed

« back to all changes in this revision

Viewing changes to bin/xedid

  • Committer: Package Import Robot
  • Author(s): Bryce Harrington
  • Date: 2012-09-25 11:16:30 UTC
  • Revision ID: package-import@ubuntu.com-20120925111630-18uznhu4wh2bkqqx
Tags: 3.2
* bin/*: When run within trunk, use trunk modules
* failsafe-x: Remove the (obsolete) archive generation functionality.
  Users should use `ubuntu-bug xorg` instead in this case.
  (LP: #1036211)
* control: Depend on python3-apport since apport hooks have been
  converted to python3.
  (LP: #1056837)
* apport/source_xorg.py: Don't prompt with support questions for
  auto-collected crash bugs.
  (LP: #1036114)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
from __future__ import absolute_import, print_function, unicode_literals
26
26
 
 
27
import re
 
28
import os
27
29
import sys
28
 
import os
29
 
import re
30
30
import shutil
31
31
import fnmatch
32
32
 
33
 
sys.path.insert(0, os.path.realpath(
34
 
    os.path.join(os.path.dirname(__file__), "..")))
 
33
# Add project root directory (enable symlink, and trunk execution).
 
34
PROJECT_ROOT_DIRECTORY = os.path.abspath(
 
35
    os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0]))))
 
36
 
 
37
if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'xdiagnose'))
 
38
    and PROJECT_ROOT_DIRECTORY not in sys.path):
 
39
    sys.path.insert(0, PROJECT_ROOT_DIRECTORY)
 
40
    os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) # for subprocesses
35
41
 
36
42
from xdiagnose.edid import Edid
37
43