Skip to content

Commit

Permalink
improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
iprafols committed Aug 30, 2022
1 parent f4821e1 commit ac0b75a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/format_superset_dr12q.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,18 @@ def main(cmdargs):
if args.qso_dataframe is not None:
if ((args.qso_cat is not None) or (args.qso_specid is not None) or
(args.qso_ztrue is not None)):
parser.error("options --qso-cat, --qso-cols, --qso-specid, and --qso-ztrue " \
"are incompatible with --qso-dataframe")
parser.error("options --qso-cat, --qso-specid, and --qso-ztrue "
"are incompatible with --qso-dataframe. Found: "
f"--qso-cat {args.qso_cat} --qso-specid {args.qso_specid} "
f"--qso-ztrue {args.qso_ztrue}")
quasar_catalogue = deserialize(load_json(args.qso_dataframe))
quasar_catalogue["LOADED"] = True
else:
if (args.qso_cat is None) or (args.qso_cols is None) or (args.qso_specid is None) or (args.qso_ztrue is None):
parser.error("--qso-cat, --qso-cols, --qso-specid, and --qso-ztrue are " \
"required if --qso-dataframe is not passed")
"required if --qso-dataframe is not passed. Found: "
f"--qso-cat {args.qso_cat} --qso-specid {args.qso_specid} "
f"--qso-ztrue {args.qso_ztrue}")
quasar_catalogue = QuasarCatalogue(args.qso_cat, args.qso_cols,
args.qso_specid, args.qso_ztrue,
args.qso_hdu).quasar_catalogue()
Expand Down

0 comments on commit ac0b75a

Please sign in to comment.