Skip to content

Commit

Permalink
Remove Python 2 import workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Dec 13, 2018
1 parent 20c54ee commit 4de11a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
6 changes: 1 addition & 5 deletions contrib/devtools/github-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

# In case of a clean merge that is accepted by the user, the local branch with
# name $BRANCH is overwritten with the merged result, and optionally pushed.
from __future__ import division,print_function,unicode_literals
import os
from sys import stdin,stdout,stderr
import argparse
Expand All @@ -23,10 +22,7 @@
import sys
import json
import codecs
try:
from urllib.request import Request,urlopen
except ImportError:
from urllib2 import Request,urlopen
from urllib.request import Request, urlopen

# External tools (can be overridden using environment)
GIT = os.getenv('GIT','git')
Expand Down
1 change: 0 additions & 1 deletion contrib/linearize/linearize-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#

from __future__ import print_function, division
import struct
import re
import os
Expand Down
8 changes: 2 additions & 6 deletions contrib/linearize/linearize-hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#

from __future__ import print_function
try: # Python 3
import http.client as httplib
except ImportError: # Python 2
import httplib
from http.client import HttpConnection
import json
import re
import base64
Expand All @@ -31,7 +27,7 @@ def __init__(self, host, port, username, password):
authpair = "%s:%s" % (username, password)
authpair = authpair.encode('utf-8')
self.authhdr = b"Basic " + base64.b64encode(authpair)
self.conn = httplib.HTTPConnection(host, port=port, timeout=30)
self.conn = HttpConnection(host, port=port, timeout=30)

def execute(self, obj):
try:
Expand Down
7 changes: 1 addition & 6 deletions test/util/bitcoin-util-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@
Can also be run manually."""

from __future__ import division,print_function,unicode_literals

import argparse
import binascii
try:
import configparser
except ImportError:
import ConfigParser as configparser
import configparser
import difflib
import json
import logging
Expand Down

0 comments on commit 4de11a3

Please sign in to comment.