From e43e86fd290c459f125ba019ff42feb65d90027a Mon Sep 17 00:00:00 2001 From: mfitzasp Date: Tue, 13 Sep 2022 13:34:08 +1000 Subject: [PATCH] =?UTF-8?q?Revert=20"fixed=20reference=20error=20when=20ch?= =?UTF-8?q?ecking=20if=20a=20table=20was=20generated=20during=20V=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrosource/comparison.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/astrosource/comparison.py b/astrosource/comparison.py index e924ccc..2119c47 100644 --- a/astrosource/comparison.py +++ b/astrosource/comparison.py @@ -290,7 +290,6 @@ def calculate_comparison_variation(compFile, photFileArray, fileCount): def remove_stars_targets(parentPath, compFile, acceptDistance, targetFile, removeTargets): max_sep=acceptDistance * arcsecond logger.info("Removing Target Stars from potential Comparisons") - tableFound=False if not (compFile.shape[0] == 2 and compFile.size ==2): fileRaDec = SkyCoord(ra=compFile[:,0]*degree, dec=compFile[:,1]*degree) @@ -344,9 +343,10 @@ def remove_stars_targets(parentPath, compFile, acceptDistance, targetFile, remov logger.info(variableResult) if str(variableResult)=="Empty TableList": logger.info("VSX Returned an Empty Table.") + varTable=0 else: variableResult=variableResult['B/vsx/vsx'] - tableFound=True + varTable=1 except ConnectionError: connected=False logger.info("Connection failed, waiting and trying again") @@ -361,7 +361,7 @@ def remove_stars_targets(parentPath, compFile, acceptDistance, targetFile, remov logger.info("Failed again.") connected=False - if tableFound: + if varTable==1: logger.debug(variableResult) logger.debug(variableResult.keys())