~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-17 00:59:30 UTC
  • mfrom: (1551.15.4 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070417005930-rofskshyjsfzrahh
Fix ftp transport with servers that don't support atomic rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
 
52
52
def _supports_progress(f):
53
 
    """Detect if we can use pretty progress bars on the output stream f.
54
 
 
55
 
    If this returns true we expect that a human may be looking at that 
56
 
    output, and that we can repaint a line to update it.
57
 
    """
58
53
    isatty = getattr(f, 'isatty', None)
59
54
    if isatty is None:
60
55
        return False
79
74
        if _supports_progress(to_file):
80
75
            return TTYProgressBar(to_file=to_file, **kwargs)
81
76
        else:
82
 
            return DummyProgress(to_file=to_file, **kwargs)
 
77
            return DotsProgressBar(to_file=to_file, **kwargs)
83
78
    else:
84
79
        # Minor sanitation to prevent spurious errors
85
80
        requested_bar_type = requested_bar_type.lower().strip()