]> git.sthu.org Git - sitarba.git/commitdiff
enable output of tar
authorStefan Huber <shuber2@gmx.at>
Mon, 14 May 2012 06:53:02 +0000 (08:53 +0200)
committerStefan Huber <shuber2@gmx.at>
Mon, 14 May 2012 06:53:02 +0000 (08:53 +0200)
TODO.txt
shbackup

index f5f0b2c4008f4f8b8b6c28170e76b8aad277d010..2488c323811b33148025d4ca557b3ac21bda9517 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -1 +1,4 @@
-- support sporadic full backups
+- print size in list
+- remember tar commands
+- ask to proceed when making backup
+- print and log exit code and stderr of tar afterwards
index cc323c50f71fe37ad77a419188c589ae77a78cc2..db2c66125b3f09514f21f809dbaf842e86270ddb 100755 (executable)
--- a/shbackup
+++ b/shbackup
@@ -248,28 +248,12 @@ class BackupManager:
             taropts += ["--exclude", pat]
 
         tarargs = [tarpath] + taropts + ["-f", fsfn] + fileset.dirs
-        print("tarargs: ", tarargs)
-        tarp = subprocess.Popen( tarargs, \
-                stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
-        while tarp.poll():
-            l = tarp.stdout.readline()
-            if len(l) > 0:
-                print(l.decode(), end="")
-            l = tarp.stderr.readline()
-            if len(l) > 0:
-                print(l.decode(), end="")
-
-        for l in tarp.stdout.readlines():
-            print(l.decode(), end="")
-
-        for l in tarp.stderr.readlines():
-            print(l.decode(), end="")
+        #print("tarargs: ", tarargs)
+        tarp = subprocess.Popen( tarargs )
 
         rett = tarp.wait()
         if rett != 0:
             print(tarpath + " returned with exit status " + str(rett) + ":")
-            print( tarp.stderr.read().decode() )
 
 
     def backup(self, epoch=None, mode=None):