Modify ↓
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: |
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 11 years ago by bas
- Resolution set to fixed
- Status changed from new to closed
- Version 4.3.3 deleted
Note: See
TracTickets for help on using
tickets.
I have fixed this in changset [289]. Thanksk for reporting it is useful suggestion ;-)