Permalink
Browse files

do not crash when "dar_manager" signals non-chronological files

  • Loading branch information...
1 parent c7f86e0 commit 47b300b2e553f588e358f47ecfef265b1c583808 @mzuther committed Jul 29, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 Lalikan.py
View
11 Lalikan.py
@@ -429,12 +429,12 @@ def __create_backup(self, backup_type, debugger):
print
if retcode == 11:
- self.__notify_user('Some files were changed during backup', \
+ self.__notify_user('Some files were changed during backup.', \
self._WARNING, debugger)
elif retcode > 0:
# FIXME: maybe catch exceptions
# FIXME: delete slices and directory (also in "debugger")
- self.__notify_user('dar exited with code %d' % retcode, \
+ self.__notify_user('dar exited with code %d.' % retcode, \
self._ERROR, debugger)
self.__notify_user('%(files)d file(s), %(size)s\n' % \
@@ -454,7 +454,10 @@ def __create_backup(self, backup_type, debugger):
retcode = proc.wait()
print
- if retcode > 0:
+ if retcode == 5:
+ self.__notify_user('Some files do not follow chronological order when archive index increases.', \
+ self._WARNING, debugger)
+ elif retcode > 0:
# FIXME: maybe catch exceptions
# FIXME: delete slices and directory (also in "debugger")
raise OSError('dar exited with code %d' % retcode)
@@ -494,7 +497,7 @@ def __create_backup(self, backup_type, debugger):
if retcode > 0:
# FIXME: maybe catch exceptions
- self.__notify_user('dar_manager exited with code %d' % \
+ self.__notify_user('dar_manager exited with code %d.' % \
retcode, self._ERROR, debugger)

0 comments on commit 47b300b

Please sign in to comment.