diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2018-05-29 14:32:08 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-07-10 18:11:08 -0400 |
| commit | 1c03ac08aa94f5bedf21ec8f48ee1ec998e0e50c (patch) | |
| tree | 0c10026079b3f0a50affb6b5d42cc3684056e5fc /python/pluginmanager.py | |
| parent | d4d1fbb390c9a31045cea8e612c02e242d11c438 (diff) | |
addition 3 compatibility changes
Diffstat (limited to 'python/pluginmanager.py')
| -rw-r--r-- | python/pluginmanager.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/pluginmanager.py b/python/pluginmanager.py index 002db573..ad314629 100644 --- a/python/pluginmanager.py +++ b/python/pluginmanager.py @@ -23,6 +23,8 @@ import ctypes # Binary Ninja components -- additional imports belong in the appropriate class from binaryninja import _binaryninjacore as core +# 2-3 compatibility +from six.moves import range class RepoPlugin(object): """ @@ -110,7 +112,7 @@ class RepoPlugin(object): result = [] count = ctypes.c_ulonglong(0) plugintypes = core.BNPluginGetPluginTypes(self.handle, count) - for i in xrange(count.value): + for i in range(count.value): result.append(PluginType(plugintypes[i])) core.BNFreePluginTypes(plugintypes) return result @@ -182,7 +184,7 @@ class Repository(object): pluginlist = [] count = ctypes.c_ulonglong(0) result = core.BNRepositoryGetPlugins(self.handle, count) - for i in xrange(count.value): + for i in range(count.value): pluginlist.append(RepoPlugin(handle=result[i])) core.BNFreeRepositoryPluginList(result, count.value) del result @@ -220,7 +222,7 @@ class RepositoryManager(object): result = [] count = ctypes.c_ulonglong(0) repos = core.BNRepositoryManagerGetRepositories(self.handle, count) - for i in xrange(count.value): + for i in range(count.value): result.append(Repository(handle=repos[i])) core.BNFreeRepositoryManagerRepositoriesList(repos) return result |
