Added dummy entries in log reader for question prompts from borg

Mon, 29 Jan 2018 09:21:07 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 29 Jan 2018 09:21:07 +0000
changeset 88
dfd52898f175
parent 87
a214d475aa28
child 89
51cc2e25af38

Added dummy entries in log reader for question prompts from borg

borgend/backup.py file | annotate | diff | comparison | revisions
--- a/borgend/backup.py	Sun Jan 28 19:27:34 2018 +0000
+++ b/borgend/backup.py	Mon Jan 29 09:21:07 2018 +0000
@@ -292,6 +292,18 @@
                     with self._cond:
                         self.errors=self.errors.combine(errors)
                         status, callback=self.__status_unlocked()
+
+            elif t=='question_prompt' or t=='question_prompt_retry':
+                self.logger.error('Did not expect to receive question prompt from borg')
+                with self._cond:
+                    self.errors=self.errors.combine(Errors.ERRORS)
+                # TODO: terminate org? Send 'NO' reply?
+
+            elif (t=='question_invalid_answer' or t=='question_accepted_default'
+                  or t=='question_accepted_true' or t=='question_accepted_false'
+                  or t=='question_env_answer'):
+                pass
+
             else:
                 self.logger.debug('Unrecognised log entry %s' % str(status))
 
@@ -340,7 +352,7 @@
             if not ok:
                 with self._cond:
                     self.errors=self.errors.combine(Errors.ERRORS)
-    
+
             if latest:
                 self.logger.info('borg info: Previous backup was on %s' % latest.isoformat())
                 realtime=time.mktime(latest.timetuple())

mercurial