~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Gordon Tyler
  • Date: 2011-06-30 21:00:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6007.
  • Revision ID: gordon@doxxx.net-20110630210038-bzscps46jgcqtkr0
Use known executables for win32 and other platforms in test_exe_on_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
from bzrlib import (
44
44
    cache_utf8,
45
 
    config,
46
45
    errors,
47
46
    trace,
48
47
    win32utils,
986
985
def report_extension_load_failures():
987
986
    if not _extension_load_failures:
988
987
        return
989
 
    if config.GlobalStack().get('ignore_missing_extensions'):
 
988
    from bzrlib.config import GlobalConfig
 
989
    if GlobalConfig().get_user_option_as_bool('ignore_missing_extensions'):
990
990
        return
991
991
    # the warnings framework should by default show this only once
992
992
    from bzrlib.trace import warning
2487
2487
    is_local_pid_dead = win32utils.is_local_pid_dead
2488
2488
else:
2489
2489
    is_local_pid_dead = _posix_is_local_pid_dead
2490
 
 
2491
 
 
2492
 
def fdatasync(fileno):
2493
 
    """Flush file contents to disk if possible.
2494
 
    
2495
 
    :param fileno: Integer OS file handle.
2496
 
    :raises TransportNotPossible: If flushing to disk is not possible.
2497
 
    """
2498
 
    fn = getattr(os, 'fdatasync', getattr(os, 'fsync', None))
2499
 
    if fn is not None:
2500
 
        fn(fileno)