Opened 11 years ago

Closed 11 years ago

#33 closed enhancement (fixed)

PBSQuery.PBSError: Attribute key error: __nonzero__

Reported by: anonymous Owned by: bas
Priority: minor Milestone:
Component: PBSQuery Version:
Keywords: Cc:


I've been playing around with PBSQuery for a few minutes; please let me know if I'm missing something obvious.

PBSQuery.getjob() returns and empty dictionary if the job is not found, and returns some other object that can be used like a dictionary if the job is found.

What I would like to do is something like this:

status = pbsq.getjob(id) if status:

#do something


#job not in queue

however, if the job is found this will fail:

PBSQuery.PBSError: Attribute key error: nonzero

if the job is not found, this code is fine because a dict implements nonzero(self)

Attachments (0)

Change History (1)

comment:1 Changed 11 years ago by bas

  • Resolution set to fixed
  • Status changed from new to closed
  • Version 4.3.3 deleted

I have fixed this in changset [289]. Thanksk for reporting it is useful suggestion ;-)

Add Comment

Modify Ticket

Change Properties
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.