gemini.git

going-flying.com gemini git repository

summary

tree

log

refs

292c25770db668c52be55bbdec39569b294706da - Matthew Ernisse - 1596342161

list() to force iterate so we can sort

view tree

view raw

diff --git a/files/thoughts-to-gemini.py b/files/thoughts-to-gemini.py
index eea3cf3..2f26da9 100755
--- a/files/thoughts-to-gemini.py
+++ b/files/thoughts-to-gemini.py
@@ -176,11 +176,11 @@ class Thoughts(object):
 			local_newest = self.thoughts[0]['id']
 			if self.api.newest > local_newest:
 				_t = ThoughtApi(local_newest)
-				_t.thoughts.sort(
+				thoughts = list(_t.thoughts).sort(
 					key=lambda k: k['id'],
 					reverse=True
 				)
-				self.thoughts.extend(_t.thoughts)
+				self.thoughts.extend(thoughts)
 		else:
 			_t = ThoughtApi()
 			self.thoughts = list(_t.thoughts)