Modify

Opened 10 years ago

Closed 10 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:

Description

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

else:

#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 10 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
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.