Task #6873 (closed)
Opened 8 years ago
Closed 8 years ago
Add NoneType check to Python samples
| Reported by: | jamoore | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-Beta4.3.2 |
| Component: | General | Version: | n.a. |
| Keywords: | n.a. | Cc: | |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | 2011-09-29 (6) |
Description (last modified by wmoore)
Add this code (well commented) after any getObject("Image", id) for "Project", "Dataset" too.
if image is None:
print "Image not found: %s" % imageId
sys.exit(0)
See: http://lists.openmicroscopy.org.uk/mailman/private/ome-nitpick/2011-September/003187.html
Change History (1)
comment:1 Changed 8 years ago by wmoore
- Description modified (diff)
- Remaining Time changed from 0.25 to 0
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
We have this in some places as an example, but not everywhere (code would get too bloated)