-
- if args.clean_language:
- try:
- if not os.path.exists(constant.NHENTAI_HOME):
- os.mkdir(constant.NHENTAI_HOME)
-
- with open(constant.NHENTAI_LANGUAGE, 'w') as f:
- f.close()
- except Exception as e:
- logger.error('Cannot create NHENTAI_HOME: {}'.format(str(e)))
- exit(1)
-
- logger.info('Language now is DEFAULT')
- exit(0)
-
- if os.path.exists(constant.NHENTAI_PROXY):
- with open(constant.NHENTAI_PROXY, 'r') as f:
- link = f.read()
- constant.PROXY = {'http': link, 'https': link}