From 8b1f8ae7218acd33fc01080a9538159637354249 Mon Sep 17 00:00:00 2001
From: David Hendriks <davidhendriks93@gmail.com>
Date: Fri, 8 Jan 2021 00:20:41 +0000
Subject: [PATCH] fixed some bugs

---
 binarycpython/utils/functions.py | 6 +++---
 binarycpython/utils/grid.py      | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py
index a13db153c..0dfdc51ad 100644
--- a/binarycpython/utils/functions.py
+++ b/binarycpython/utils/functions.py
@@ -1125,8 +1125,8 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict:
         # See whether the types are actually the same
         if not type(dict_1[key]) is type(dict_2[key]):
             print(
-                "Error {} and {} are not of the same type and cannot be merged".format(
-                    dict_1[key], dict_2[key]
+                "Error key: {} value: {} and key: {} value: {} are not of the same type and cannot be merged".format(
+                    key, dict_1[key], key, dict_2[key]
                 )
             )
             raise ValueError
@@ -1153,7 +1153,7 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict:
 
             # Booleans (has to be the type Bool, not just a 0 or 1)
             elif isinstance(dict_1[key], bool) and isinstance(dict_2[key], bool):
-                new_dict[key] = dict_1[key] * dict_2[key]
+                new_dict[key] = dict_1[key] or dict_2[key]
 
             else:
                 print(
diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index f6cad6695..82a1f91f4 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -1096,7 +1096,6 @@ class Population:
         self.grid_options["_count"] = 0
         self.grid_options["_probtot"] = 0
         self.grid_options["_system_generator"] = None
-        self.grid_options["error"] = 0
         self.grid_options["_failed_count"] = 0
         self.grid_options["_failed_prob"] = 0
         self.grid_options["_errors_found"] = False
@@ -1495,7 +1494,7 @@ class Population:
         )
         code_string += (
             indent * (depth + 1)
-            + "print('with a total probability of {}'.format(self.grid_options['probtot']))\n"
+            + "print('with a total probability of {}'.format(self.grid_options['_probtot']))\n"
         )
 
         if dry_run:
-- 
GitLab