Skip to content

Commit e08185b

Browse files
committed
refactoring
1 parent 958b5c2 commit e08185b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugins/bap/utils/ida.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
"""Utilities that interact with IDA."""
22
import idaapi
33
import idc
4-
from idaapi import *
5-
from idc import *
64
import idautils
75

86
from ._service import Service
97
from ._comment_handler import CommentHandlers
108
from ._ctyperewriter import Rewriter
119

10+
try:
11+
from idc import get_segm_name
12+
except ImportError:
13+
from idaapi import get_segm_name
1214

1315
service = Service()
1416
comment = CommentHandlers()

tests/mockidaapi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ def get_cmt(ea, off): NotImplemented
1414
def set_cmt(ea, off): NotImplemented
1515
def askyn_c(dflt, title): NotImplemented
1616
def get_input_file_path() : NotImplemented
17+
def get_segm_name(ea): NotImplemented

0 commit comments

Comments
 (0)