Skip to content

Commit ff919dc

Browse files
committed
Fix test cases for multiprocess/python veresion compatibility.
dict.values() can't be pickled - it must be converted to a list.
1 parent 7baa883 commit ff919dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

usr/lib/linuxmint/mintUpdate/mintUpdate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,15 +2164,15 @@ def handle_apt_check_test(self, queue):
21642164
# Simulate an update of mintupdate itself.
21652165
check = checkAPT.APTCheck()
21662166
self.dummy_update(check, "mintupdate", False)
2167-
queue.put([None, check.updates.values()])
2167+
queue.put([None, list(check.updates.values())])
21682168
elif test_mode == "updates":
21692169
# Simulate some normal updates
21702170
check = checkAPT.APTCheck()
21712171
self.dummy_update(check, "python3", False)
21722172
self.dummy_update(check, "mint-meta-core", False)
21732173
self.dummy_update(check, "linux-generic", True)
21742174
self.dummy_update(check, "xreader", False)
2175-
queue.put([None, check.updates.values()])
2175+
queue.put([None, list(check.updates.values())])
21762176
elif test_mode == "tracker-max-age":
21772177
# Simulate the UpdateTracker notifying about updates.
21782178
check = checkAPT.APTCheck()
@@ -2194,7 +2194,7 @@ def handle_apt_check_test(self, queue):
21942194
with open(os.path.join(CONFIG_PATH, "updates.json"), "w") as f:
21952195
json.dump(root_json, f)
21962196

2197-
queue.put([None, check.updates.values()])
2197+
queue.put([None, list(check.updates.values())])
21982198

21992199
return True
22002200
# ---------------- Testing ------------------------------------------#

0 commit comments

Comments
 (0)