Skip to content

Commit c4783aa

Browse files
committed
Remove useless if statement in mixins
1 parent e491494 commit c4783aa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

botogram/objects/mixins.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,7 @@ def delete_message(self, message):
364364
@_require_api
365365
def set_photo(self, path):
366366
args = {"chat_id": self.id}
367-
if path is not None:
368-
files = {"photo": open(path, "rb")}
369-
else:
370-
raise TypeError("path of the new photo is missing")
367+
files = {"photo": open(path, "rb")}
371368

372369
self._api.call("setChatPhoto", args, files)
373370

0 commit comments

Comments
 (0)