]> arthur.barton.de Git - bup.git/commitdiff
Get rid of the reprogress() function
authorAlexander Barton <alex@barton.de>
Sun, 28 Dec 2014 19:43:03 +0000 (20:43 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 31 Dec 2014 17:47:31 +0000 (18:47 +0100)
Signed-off-by: Alexander Barton <alex@barton.de>
cmd/split-cmd.py
lib/bup/helpers.py

index 70daf7c688258b7da31c34a2bac83015c3316fac..9425705eb2ac466804d0e797c5da8e05801914e3 100755 (executable)
@@ -135,7 +135,6 @@ if pack_writer and opt.blobs:
                                        progress=prog)
     for (sha, size, level) in shalist:
         print sha.encode('hex')
-        reprogress()
 elif pack_writer:  # tree or commit or name
     if opt.name: # insert dummy_name which may be used as a restore target
         mode, sha = \
index 715ce3389dcc9550e9447fb86025c68c2d677707..ceab7ecc24942d14442d12756b406e8971c664d2 100644 (file)
@@ -81,18 +81,15 @@ def debug2(s):
 
 istty1 = os.isatty(1) or (atoi(os.environ.get('BUP_FORCE_TTY')) & 1)
 istty2 = os.isatty(2) or (atoi(os.environ.get('BUP_FORCE_TTY')) & 2)
-_last_progress = ''
 def progress(s):
     """Calls log() if stderr is a TTY.  Does nothing otherwise."""
-    global _last_progress
     if istty2:
         log(s)
-        _last_progress = s
 
 
 def qprogress(s):
     """Calls progress() only if we haven't printed progress in a while.
-    
+
     This avoids overloading the stderr buffer with excess junk.
     """
     global _last_prog
@@ -102,16 +99,6 @@ def qprogress(s):
         _last_prog = now
 
 
-def reprogress():
-    """Calls progress() to redisplay the most recent progress message.
-
-    Useful after you've printed some other message that wipes out the
-    progress line.
-    """
-    if _last_progress and _last_progress.endswith('\r'):
-        progress(_last_progress)
-
-
 def mkdirp(d, mode=None):
     """Recursively create directories on path 'd'.