~jtatum/mago/gcalctool

« back to all changes in this revision

Viewing changes to mago/cmd/main.py

  • Committer: James Tatum
  • Date: 2009-09-03 12:21:21 UTC
  • mfrom: (105.1.8 gconf)
  • Revision ID: jtatum@gmail.com-20090903122121-villivh8kq2bxcb3
Merging gconf branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
from . import globals
13
13
from .runner import TestSuiteRunner
14
14
from .parser import parse_options
15
 
from .utils import safe_make_directory, safe_run_command
 
15
from .utils import safe_make_directory, safe_run_command, accessibility_enabled
16
16
from .discovery import discover_applications
17
17
 
 
18
def validate_environment():
 
19
    """
 
20
    Check environmental settings and ensure that the system is setup for mago
 
21
    """
 
22
    if not accessibility_enabled():
 
23
        raise Exception, ("Accessibility must be enabled to use mago. "
 
24
            "Enable it in the assisstive technologies panel and restart X.")
18
25
 
19
26
def process_application(app_data, target_directory):
20
27
    """
111
118
    # Get shared directory based on the directory in which binary is located
112
119
    options = parse_options(args)
113
120
    configure_logging(options.log_level, options.log)
 
121
    
 
122
    validate_environment()
114
123
 
115
124
    logging.debug('MAGO_SHARE: %s' % globals.MAGO_SHARE)
116
125
    logging.debug('MAGO_PATH: %s' % ':'.join(globals.MAGO_PATH))