From 5d7fdabe697d1180a7b7bc2a088cfc3765895a1f Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Thu, 9 Apr 2020 11:58:26 +0200 Subject: [PATCH] Use errno module instead of os.errno for Python 3.7 compatibility os.errno is no longer available in Python >= 3.7 --- apk-anal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apk-anal.py b/apk-anal.py index 792bad6..7ce423a 100644 --- a/apk-anal.py +++ b/apk-anal.py @@ -26,7 +26,7 @@ from __future__ import print_function import r2pipe -import sys,os,subprocess +import sys,os,subprocess,errno import shutil,itertools,argparse,zipfile import magic from xml.dom.minidom import parseString @@ -286,7 +286,7 @@ def print_results(analysis_results,messages,r2p): if "anti_disassembly" in output: print("[*] Notice: APKiD found anti disassembly measures (anti-disassembly).") except OSError as e: - if e.errno == os.errno.ENOENT: + if e.errno == errno.ENOENT: print("[*] APKiD not found. Skipping.") else: raise