From bdc9fa113e9fb5fabbb47837cc033763edd6321a Mon Sep 17 00:00:00 2001 From: Ricter Z Date: Sun, 17 Jan 2021 11:50:22 +0800 Subject: [PATCH] fix #197 set proxy to null --- nhentai/cmdline.py | 4 ++-- nhentai/logger.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nhentai/cmdline.py b/nhentai/cmdline.py index fb81d45..69a38f3 100644 --- a/nhentai/cmdline.py +++ b/nhentai/cmdline.py @@ -156,7 +156,7 @@ def cmd_parser(): exit(0) # TODO: search without language - if args.proxy: + if args.proxy is not None: proxy_url = urlparse(args.proxy) if not args.proxy == '' and proxy_url.scheme not in ('http', 'https'): logger.error('Invalid protocol \'{0}\' of proxy, ignored'.format(proxy_url.scheme)) @@ -170,7 +170,7 @@ def cmd_parser(): write_config() exit(0) - if args.viewer_template: + if args.viewer_template is not None: if not args.viewer_template: args.viewer_template = 'default' diff --git a/nhentai/logger.py b/nhentai/logger.py index 8aa46b8..01b4929 100644 --- a/nhentai/logger.py +++ b/nhentai/logger.py @@ -1,7 +1,6 @@ # # Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license. # -from __future__ import print_function, unicode_literals import logging import re import platform -- 2.44.0