From c46c646410d67769fee212fa16c996a773c487ca Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Jan 24 2014 13:23:47 +0000 Subject: Call restorecon only when the file copy succeeds. --- diff --git a/authinfo.py b/authinfo.py index f1f2b3a..97526e1 100644 --- a/authinfo.py +++ b/authinfo.py @@ -1111,7 +1111,8 @@ class FileBackup: rv = self.safeCopy(backuppath, self.origPath) try: - os.system("restorecon '"+self.origPath+"'") + if rv: + os.system("restorecon '"+self.origPath+"'") except (IOError, OSError): pass