backup.py

changeset 14
5a988a2c2624
parent 12
16a8c63344c0
child 15
aaf1a281a3fe
equal deleted inserted replaced
13:1813654427d7 14:5a988a2c2624
104 for status in iter(self.borg_instance.read_log, None): 104 for status in iter(self.borg_instance.read_log, None):
105 logging.debug(str(status)) 105 logging.debug(str(status))
106 t=status['type'] 106 t=status['type']
107 #may_indicate_finished=False 107 #may_indicate_finished=False
108 if t=='progress_percent': 108 if t=='progress_percent':
109 #may_indicate_finished=True 109 if 'current' in status and 'total' in status:
110 # Temporary output 110 with self.lock:
111 if 'current' not in status: 111 self.current_operation.progress_current=status['current']
112 status['current']=0 112 self.current_operation.progress_total=status['total']
113 if 'total' not in status: 113 status, callback=self.__status_unlocked()
114 status['total']=0 114 if callback:
115 print('%d / %d' % (status['current'], status['total'])) 115 callback(self, status)
116 elif t=='archive_progress': 116 elif t=='archive_progress':
117 pass 117 pass
118 elif t=='progress_message': 118 elif t=='progress_message':
119 #may_indicate_finished=True 119 #may_indicate_finished=True
120 pass 120 pass

mercurial