gpchelkin / scdlbot

Do not use bare except, specify exception instead FLK-E722
Bug risk
Minor
6 months ago5 years old
do not use bare 'except'
1124                        id3 = None
1125                        try:
1126                            id3 = ID3(file, translate=False)
1127                        except:1128                            pass
1129
1130                        parts_number = file_size // MAX_TG_FILE_SIZE + 1
do not use bare 'except'
1333                    message_id=wait_message_id,
1334                ),
1335            )
1336        except:1337            pass
1338    run_async(bot.shutdown())
1339
do not use bare 'except'
1252                                try:
1253                                    performer = ", ".join(mp3["artist"])
1254                                    title = ", ".join(mp3["title"])
1255                                except:1256                                    pass
1257                                if TG_BOT_API_LOCAL_MODE:
1258                                    audio = path.absolute().as_uri()
do not use bare 'except'
1023                    cookies_download_file.write(r.content)
1024                    cookies_download_file.close()
1025                    ydl_opts["cookiefile"] = str(cookies_download_file_path)
1026                except:1027                    logger.debug("download_url_and_send could not download cookies file")
1028                    pass
1029            elif cookies_file.startswith("firefox:"):
do not use bare 'except'
1147                                if id3:
1148                                    try:
1149                                        id3.save(file_part, v1=ID3v1SaveOptions.CREATE, v2_version=4)
1150                                    except:1151                                        pass
1152                                file_parts.append(file_part)
1153                        except Exception: