Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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

We have this in some places as an example, but not everywhere (code would get too bloated)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.80888 sec.)

We're Hiring!