From 57d4834158d9908f2a63777f24d8fa066c1106b2 Mon Sep 17 00:00:00 2001 From: mwitt Date: Mon, 7 Aug 2017 14:21:20 +0200 Subject: [PATCH] Fixed imports to make rpc lib python3 compatible --- src/bap/asm.py | 2 +- src/bap/rpc.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bap/asm.py b/src/bap/asm.py index 03ff452..e0ce2b8 100644 --- a/src/bap/asm.py +++ b/src/bap/asm.py @@ -2,7 +2,7 @@ """Disassembled instuctions""" -from adt import ADT +from .adt import ADT class Kind(ADT) : pass class Having_side_effects(Kind) : pass diff --git a/src/bap/rpc.py b/src/bap/rpc.py index fb58be2..8ac0c1b 100644 --- a/src/bap/rpc.py +++ b/src/bap/rpc.py @@ -1,15 +1,19 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import os, time, atexit +import os, time, atexit, sys from signal import signal, SIGTERM import requests from subprocess import Popen from mmap import mmap -from urlparse import urlparse, parse_qs +if sys.version_info > (3, 0): + from urllib.parse import urlparse, parse_qs +else: + from urlparse import urlparse, parse_qs + from tempfile import NamedTemporaryFile import json -import adt, arm, asm, bil +from . import adt, arm, asm, bil import threading