Skip to content

Commit 57be163

Browse files
author
Ilya Ableev
committed
Fixing #129
1 parent 1ce34c3 commit 57be163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zbxtg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ def get_uid(self, name):
178178
chat = m["message"]["chat"]
179179
elif "edited_message" in m:
180180
chat = m["edited_message"]["chat"]
181+
else:
182+
continue
181183
if chat["type"] == self.type == "private":
182184
if "username" in chat:
183185
if chat["username"] == name:
@@ -205,6 +207,8 @@ def update_cache_uid(self, name, uid, message="Add new string to cache file"):
205207
return True
206208

207209
def get_uid_from_cache(self, name):
210+
if self.debug:
211+
print "Trying to read cached uid for {0}, {1}, from {2}".format(name, self.type, self.tmp_uids)
208212
uid = 0
209213
if os.path.isfile(self.tmp_uids):
210214
with open(self.tmp_uids, 'r') as cache_file_uids:

0 commit comments

Comments
 (0)