~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-01 11:45:59 UTC
  • mfrom: (5971.1.87 bzr-gpgme)
  • Revision ID: pqm@pqm.ubuntu.com-20110701114559-gshz8uv6hr0x0pax
(jr) Various small improvements to GPG support
 - improve LoopbackGPGStrategy doc string - use unicode strings for UI
 - add doc string to verify_signatures_available()
 - add process_events_callback argument to do_verifications() to keep GUIs
 responsive (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)