aboutsummaryrefslogtreecommitdiffstats
path: root/webmap-download
diff options
context:
space:
mode:
Diffstat (limited to 'webmap-download')
-rwxr-xr-xwebmap-download8
1 files changed, 5 insertions, 3 deletions
diff --git a/webmap-download b/webmap-download
index 7720e79..583c5dd 100755
--- a/webmap-download
+++ b/webmap-download
@@ -142,16 +142,18 @@ if __name__ == '__main__':
help='optional directory for lock files')
parser.add_argument('--quiet', action='store_true',
help='skip progress bars even when stderr is a TTY')
- parser.add_argument('--debug', action='store_true', help=argparse.SUPPRESS)
+ parser.add_argument('--debug', action='count', default=0,
+ help=argparse.SUPPRESS)
parser.add_argument('--exit-code', default=True, action=argparse.BooleanOptionalAction,
help='whether to exit with status 1 in case of download failures')
parser.add_argument('groupname', nargs='*', help='Group(s) to process')
args = parser.parse_args()
- if args.debug:
+ if args.debug > 0:
+ logging.getLogger().setLevel(logging.DEBUG)
+ if args.debug > 1:
from http.client import HTTPConnection
HTTPConnection.debuglevel = 1
- logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True