summaryrefslogtreecommitdiffstats
path: root/firstaidkit
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-05-30 18:16:54 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-05-30 18:16:54 +0200
commit86e5f50d19de168789e8c58f71f92b2d6ffe8497 (patch)
treea93bbfa1e5aa6934be95653500e62738b8adfea5 /firstaidkit
parenta3a5eff6af00a7b5c2d968f4ea3ee4c94cc40027 (diff)
downloadfirstaidkit-86e5f50d19de168789e8c58f71f92b2d6ffe8497.tar.gz
firstaidkit-86e5f50d19de168789e8c58f71f92b2d6ffe8497.tar.xz
firstaidkit-86e5f50d19de168789e8c58f71f92b2d6ffe8497.zip
Catch the exception at the firstaidkit script level.
Give some additional information to the user so he knows what to do.
Diffstat (limited to 'firstaidkit')
-rwxr-xr-xfirstaidkit13
1 files changed, 11 insertions, 2 deletions
diff --git a/firstaidkit b/firstaidkit
index b194d3a..e6e8f69 100755
--- a/firstaidkit
+++ b/firstaidkit
@@ -22,6 +22,7 @@ from pyfirstaidkit import Tasker
from pyfirstaidkit import Config
from pyfirstaidkit import reporting
from pyfirstaidkit import initLogger
+from pyfirstaidkit.utils import BackupException
class Flags:
print_config = False
@@ -244,8 +245,16 @@ if __name__=="__main__":
sys.exit(1)
report = reporting.Reports(maxsize = 1, round = True)
- singlerun = Tasker(Config, reporting = report)
-
+ try:
+ singlerun = Tasker(Config, reporting = report)
+ except BackupException, be:
+ print "\nError: %s" % be[0]
+ print "\nThis happens when firstaidkit end without properly closing the backup dir. "
+ print "If you are sure you don't have sensitive information in that directory, "
+ print "you can safely erase it. If you are not sure, just change the "
+ print "directory name.\n"
+ sys.exit(1)
+
if Config.operation.verbose=="False":
outputThread = Output(singlerun.reporting())
if Config.operation.gui=="gui":