]> git.lizzy.rs Git - nhentai.git/commitdiff
fix #197 set proxy to null
authorRicter Z <ricterzheng@gmail.com>
Sun, 17 Jan 2021 03:50:22 +0000 (11:50 +0800)
committerRicter Z <ricterzheng@gmail.com>
Sun, 17 Jan 2021 03:50:22 +0000 (11:50 +0800)
nhentai/cmdline.py
nhentai/logger.py

index fb81d457688a0c555afe90a2d489a352d10134c0..69a38f3035522a7fc6d05afd2bdb16b181e4d74a 100644 (file)
@@ -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'
 
index 8aa46b82d7e5d81fc36bf4da69b63195a5841f27..01b492993cef3ef9afb27fbb4802f1e729cb647b 100644 (file)
@@ -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