Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Use a different message when AstrometryNetTimeoutExpired is emitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Víctor Terrón committed Sep 4, 2014
1 parent f54662b commit c64d98d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions astrometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,16 @@ def main(arguments = None):

try:
output_path = astrometry_net(img.path, **kwargs)
except AstrometryNetUnsolvedField:
msg = "%s did not solve. Ignored." % img.path

except AstrometryNetUnsolvedField, e:

# A subclass of AstrometryNetUnsolvedField
if isinstance(e, AstrometryNetTimeoutExpired):
msg = "%s exceeded the timeout limit. Ignored."
else:
msg = "%s did not solve. Ignored."

msg %= img.path
print style.prefix + msg
warnings.warn(msg, RuntimeWarning)
continue
Expand Down

0 comments on commit c64d98d

Please sign in to comment.