diff options
| author | Nick Vatamaniuc <vatamane@apache.org> | 2018-10-03 13:30:18 -0400 |
|---|---|---|
| committer | Nick Vatamaniuc <vatamane@apache.org> | 2018-11-26 17:49:33 -0500 |
| commit | 2a3467d51415569e5f93c0cf4afbc5bbcd1ba17b (patch) | |
| tree | f033c0f7aa578c035720f75d2f23eaa9a3f41bf8 /dev/run | |
| parent | 1347806d2feebce53325070b475f9e211d240ddf (diff) | |
| download | couchdb-2a3467d51415569e5f93c0cf4afbc5bbcd1ba17b.tar.gz | |
Switch to python 3
Ran 2to3 and fixed a few deprecated warnings
Issue #1632
Diffstat (limited to 'dev/run')
| -rwxr-xr-x | dev/run | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of @@ -34,12 +34,12 @@ from pbkdf2 import pbkdf2_hex COMMON_SALT = uuid.uuid4().hex try: - from urllib import urlopen + from urllib.request import urlopen except ImportError: from urllib.request import urlopen try: - import httplib as httpclient + import http.client as httpclient except ImportError: import http.client as httpclient @@ -58,7 +58,8 @@ def log(msg): if log.verbose: sys.stdout.write(chars) sys.stdout.flush() - callargs = dict(list(zip(inspect.getargspec(func).args, args))) + argnames = list(inspect.signature(func).parameters.keys()) + callargs = dict(list(zip(argnames, args))) callargs.update(kwargs) print_('[ * ] ' + msg.format(**callargs) + ' ... ') try: @@ -365,7 +366,7 @@ def boot_nodes(ctx): def ensure_all_nodes_alive(ctx): - status = dict((num, False) for num in range(ctx['N'])) + status = dict((num, False) for num in list(range(ctx['N']))) for _ in range(10): for num in range(ctx['N']): if status[num]: |
