Skip to content

Commit

Permalink
few more py3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vesellov committed Oct 10, 2018
1 parent 1304ed0 commit 01bd3f0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion CodernityDB/tree_index.py
Expand Up @@ -24,7 +24,6 @@
import io
import shutil
from .storage import IU_Storage
# from ipdb import set_trace

from CodernityDB.env import cdb_environment
from CodernityDB.index import TryReindexException
Expand Down
6 changes: 3 additions & 3 deletions lib/net_misc.py
Expand Up @@ -472,7 +472,7 @@ def readResponse(response):
return d


def getPageTwisted(url, timeout=10):
def getPageTwisted(url, timeout=10, method=b'GET'):
"""
A smart way to download pages from HTTP hosts.
"""
Expand Down Expand Up @@ -502,9 +502,9 @@ def getPageTwisted(url, timeout=10):
agent = Agent(reactor, connectTimeout=timeout)

d = agent.request(
method=b'GET',
method=method,
uri=url,
headers=Headers({'User-Agent': [_UserAgentString, ]}),
headers=Headers({b'User-Agent': [_UserAgentString, ]}),
)
# d = getPage(url, agent=_UserAgentString, timeout=timeout)
# if timeout:
Expand Down
2 changes: 2 additions & 0 deletions main/bpmain.py
Expand Up @@ -170,6 +170,8 @@ def _tray_control_func(cmd):
# plug.init()
# reactor.addSystemEventTrigger('before', 'shutdown', plug.shutdown)

lg.out(2, " python executable is: %s" % sys.executable)
lg.out(2, " python version is:\n %s" % sys.version)
lg.out(2, " python sys.path is:\n %s" % ('\n '.join(sys.path)))

lg.out(2, "bpmain.run UI=[%s]" % UI)
Expand Down
1 change: 0 additions & 1 deletion p2p/lookup.py
Expand Up @@ -453,7 +453,6 @@ def _on_node_observed(self, idurl, node):
d.addCallback(self._on_identity_cached, node)
return d
except:
import pdb; pdb.set_trace()
lg.exc()
return idurl

Expand Down
4 changes: 2 additions & 2 deletions updates/git_proc.py
Expand Up @@ -276,8 +276,8 @@ class GitProcessProtocol(protocol.ProcessProtocol):

def __init__(self, callbacks=[]):
self.callbacks = callbacks
self.out = ''
self.err = ''
self.out = b''
self.err = b''

def errReceived(self, inp):
self.err += inp
Expand Down

0 comments on commit 01bd3f0

Please sign in to comment.