def set(): if not os.path.exists(settings.MEDIA_ROOT): try: os.mkdir(settings.MEDIA_ROOT) except OSError: return if not os.path.exists(settings.MEDIA_ROOT+'/download'): try: os.mkdir(settings.MEDIA_ROOT+'/download') except OSError: return if not os.path.exists(settings.BASE_DIR + "/log"): try: os.mkdir(settings.BASE_DIR + "/log") except OSError: return if not os.path.exists(settings.BASE_DIR + "/log/message"): try: os.mkdir(settings.BASE_DIR + "/log/message") except OSError: return if not os.path.exists(settings.BASE_DIR + "/log/error"): try: os.mkdir(settings.BASE_DIR + "/log/error") except OSError: return if not os.path.exists(settings.BASE_DIR + "/log/log"): try: os.mkdir(settings.BASE_DIR + "/log/log") except OSError: return if not os.path.exists(settings.MEDIA_ROOT + "/tgbot"): try: os.mkdir(settings.MEDIA_ROOT + "/tgbot") except OSError: return