diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-08 02:15:50 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-08 11:35:16 +0100 |
commit | 9bde69bfc1dcd17a92ac2ee5abfcda5b30034d93 (patch) | |
tree | 456489d0088ab36dd7b3c438a597183134f43ccc /store.py | |
parent | ada1b5f109ebaa6f3adb7cd87b007c6db891811c (diff) | |
download | Trader-9bde69bfc1dcd17a92ac2ee5abfcda5b30034d93.tar.gz Trader-9bde69bfc1dcd17a92ac2ee5abfcda5b30034d93.tar.zst Trader-9bde69bfc1dcd17a92ac2ee5abfcda5b30034d93.zip |
Add merge method for report
Diffstat (limited to 'store.py')
-rw-r--r-- | store.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -17,6 +17,10 @@ class ReportStore: | |||
17 | 17 | ||
18 | self.logs = [] | 18 | self.logs = [] |
19 | 19 | ||
20 | def merge(self, other_report): | ||
21 | self.logs += other_report.logs | ||
22 | self.logs.sort(key=lambda x: x["date"]) | ||
23 | |||
20 | def print_log(self, message): | 24 | def print_log(self, message): |
21 | message = str(message) | 25 | message = str(message) |
22 | if self.verbose_print: | 26 | if self.verbose_print: |