Visidata vt function homepath fix

This commit is contained in:
TKE
2022-11-14 09:11:42 +01:00
parent d0c51067fd
commit 8d77b64eec

View File

@@ -79,8 +79,9 @@ def vendor(mac):
def _get_vt():
try:
from virus_total_apis import PublicApi as VirusTotalPublicApi
with open('~/.virustotal_api_key') as af:
API_KEY = af.readline()
import os.path
with open(os.path.expanduser('~/.virustotal_api_key')) as af:
API_KEY = af.readline().strip()
vt = VirusTotalPublicApi(API_KEY)
return vt
except: