Ejemplo n.º 1
0
 def getjobs(self, path=None):
     """Gives list of all jobs (objects) referenced in current folder
     or folder in the path if the latter is provided.
     """
     # jobslice
     ##res = []
     res = JobRegistrySlice("")
     registry = self._getRegistry()
     do_clean = False
     if registry is not None:
         try:
             registry = registry._parent
         except:
             Ganga.Utility.logging.log_unknown_exception()
             pass
         path = os.path.join(*self.__get_path(path))
         res.name = "jobs found in %s" % path
         cont = self.ls(path)
         for i in cont['jobs']:
             try:
                 try:
                     id = int(i)
                     j = registry[id]
                 except ValueError:
                     j = registry[int(i.split('.')[0])].subjobs[int(
                         i.split('.')[1])]
             except RegistryKeyError, ObjectNotInRegistryError:
                 do_clean = True
             else:
                 res.objects[j.id] = j
Ejemplo n.º 2
0
 def getjobs(self, path=None):
     """Gives list of all jobs (objects) referenced in current folder
     or folder in the path if the latter is provided.
     """
     # jobslice
     ##res = []
     res = JobRegistrySlice("")
     registry = self._getRegistry()
     do_clean = False
     if registry is not None:
         try:
             registry = registry._parent
         except:
             Ganga.Utility.logging.log_unknown_exception()
             pass
         path = os.path.join(*self.__get_path(path))
         res.name = "jobs found in %s" % path
         cont = self.ls(path)
         for i in cont['jobs']:
             try:
                 try:
                     id = int(i)
                     j = registry[id]
                 except ValueError:
                     j = registry[int(i.split('.')[0])].subjobs[int(i.split('.')[1])]
             except RegistryKeyError, ObjectNotInRegistryError:
                 do_clean = True
             else:
                 res.objects[j.id] = j
Ejemplo n.º 3
0
 def getjobs(self, path = None):
     """Gives list of all jobs (objects) referenced in current folder
     or folder in the path if the latter is provided.
     """        
     #jobslice
     ##res = []
     res = JobRegistrySlice("") 
     registry = self._getRegistry()
     do_clean = False
     if registry is not None:
         registry = registry._parent
         path = os.path.join(*self.__get_path(path))
         res.name = "jobs found in %s" % path
         cont = self.ls(path)
         for i in cont['jobs']:
             try:
                 try:
                     id = int(i)
                     j = registry[id]
                 except ValueError:
                     j = registry[int(i.split('.')[0])].subjobs[int(i.split('.')[1])]
             except RegistryKeyError:
                 do_clean = True
             else:
                 res.objects[j.id] = j
     if do_clean:
         self.cleanlinks()
     return _wrap(res)