Opened 12 years ago

Closed 12 years ago

#26 closed (fixed)

need to import python types when comparing to ListType

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone: 2012-09-04 client release
Component: Clients Version:
Keywords: Cc:
Dependencies:

Description

When i try to add a list of resources to an aggregate, i get a traceback:

Traceback (most recent call last):
  File "./report_relations", line 181, in <module>
    aggregate.resources = []
  File "/home/chaos/gmoc.py", line 562, in resources
    if type(resList) != ListType:
NameError: global name 'ListType' is not defined

Change History (2)

comment:1 Changed 12 years ago by sedwards@bbn.com

Or instead just do the following which doesn't require an import:

if type(resList) != list:

See http://docs.python.org/library/types.html

comment:2 Changed 12 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

This has been fixed --- it's possible to set Aggregate.resources now.

Note: See TracTickets for help on using tickets.