Python is a mess..

Sat, 20 Jan 2018 23:06:38 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 20 Jan 2018 23:06:38 +0000
changeset 17
5f6aa8830cea
parent 16
d0ffae5550ef
child 18
6d8ac70c5fb9

Python is a mess..

backup.py file | annotate | diff | comparison | revisions
--- a/backup.py	Sat Jan 20 23:00:43 2018 +0000
+++ b/backup.py	Sat Jan 20 23:06:38 2018 +0000
@@ -121,8 +121,8 @@
                 total=safe_get_int(status, 'total')
                 if current is not None and total is not None:
                     with self.lock:
-                        self.current_operation.progress_current=current
-                        self.current_operation.progress_total=total
+                        self.current_operation['progress_current']=current
+                        self.current_operation['progress_total']=total
                         status, callback=self.__status_unlocked()
 
             elif t=='archive_progress':
@@ -131,9 +131,9 @@
                 deduplicated_size=safe_get_int(status, 'deduplicated_size')
                 if original_size is not None and original_size is not None and deduplicated_size is not None:
                     with self.lock:
-                        self.current_operation.original_size=original_size
-                        self.current_operation.compressed_size=compressed_size
-                        self.current_operation.deduplicated_size=deduplicated_size
+                        self.current_operation['original_size']=original_size
+                        self.current_operation['compressed_size']=compressed_size
+                        self.current_operation['deduplicated_size']=deduplicated_size
                         status, callback=self.__status_unlocked()
 
             elif t=='progress_message':

mercurial