muhammedfurkan / TelethonUserBot

Exception caught is very general PYL-W0703
Anti-pattern
Major
2 years ago3 years old
Catching too general exception Exception
228                                progress(d, t, v_url, c_time, "Uploading..",
229                                         f"{ytdl_data_name_video}")))
230                        # os.remove(thumb)
231                    except Exception as e:232                        await v_url.client.send_message(
233                            v_url.chat_id,
234                            "{} caused `{}`".format(caption_rts, str(e)),
Catching too general exception Exception
172                                progress(d, v_url, c_time, "Uploading..",
173                                         f"{ytdl_data_name_audio}")))
174                        # os.remove(thumb)
175                    except Exception as e:176                        await v_url.client.send_message(
177                            v_url.chat_id,
178                            "{} caused `{}`".format(caption_rts, str(e)),
Catching too general exception Exception
108        else:
109            await event.edit("File Downloaded Successfully: `{}`".format(file.name))
110            return
111    except Exception as e:112        if " not found" in str(e) or "'file'" in str(e):
113            await event.edit("Download Canceled :\n`{}`".format(file.name))
114            return
Catching too general exception Exception
 62            )
 63            await event.edit(msg)
 64            await asyncio.sleep(10)
 65        except Exception as e: 66            pass
 67
 68    await event.edit("**File Downloaded Successfully:** `{}`".format(file.name))
Catching too general exception Exception
 33    # Add URL Into Queue
 34    try:
 35        download = aria2.add_uris(uris, options=None, position=None)
 36    except Exception as e: 37        # await event.edit("`Error:\n`"+str(e))
 38        return
 39    gid = download.gid