From 0c73bc0a169ec7a4043686769864901f5ec23dc4 Mon Sep 17 00:00:00 2001 From: joshuaekingsbury <6468162+joshuaekingsbury@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:53:35 -0400 Subject: [PATCH] Used Requests package (listed in ACX2 requirements.txt) to determine LATEST_ACX version in __init__.py to allow download_acx2_emissivity_files() to be called; removed 'import curl' --- __init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 0fb107d..29a970a 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ import acx2 import pyatomdb -import curl +import requests import os import shutil import time @@ -111,8 +111,9 @@ def download_acx2_emissivity_files(adbroot, userid, version): if install=='yes': - a=curl.Curl() - version=a.get('%s/releases/LATEST_ACX'%(pyatomdb.const.FTPPATH))[:-1].decode(encoding='ascii') + r=requests.get('%s/releases/LATEST_ACX'%(pyatomdb.const.FTPPATH)) + r.encoding = 'ascii' + version = r.text.partition('\n')[0] userprefs = pyatomdb.util.load_user_prefs(adbroot=adbroot) userid = userprefs['USERID'] userprefs['LASTCXVERSIONCHECK'] = time.time()