Exemple #1
0
  def map_unlocked(self, callback, description):
    coll = self.collection
    site = self.site

    pinfo_files = [
      "dicom.pinfo",
      "send_hist.pinfo",
      "error.pinfo",
      "consistency.pinfo",
      "hierarchy.pinfo",
      "link_info.pinfo",
      "FileCollectionAnalysis.pinfo",
    ]

    for subj in self.subjects:
      rev_hist = retrieve(join(subj.path, 'rev_hist.pinfo'))
      current_rev = rev_hist['CurrentRev']
      info = {'CurrentRev': current_rev}

      old_info_dir = join(subj.path, 'revisions', current_rev)

      for f in pinfo_files:
        try:
          info[f] = retrieve(join(old_info_dir, f))
        except FileNotFoundError:
          pass

      f_list = info['dicom.pinfo']['FilesToDigest']
      yield (callback(coll, site, subj.name, f_list, info))
Exemple #2
0
import sys
import pprint

import storable

filename = sys.argv[1]

data = storable.retrieve(filename)

pprint.pprint(data)
Exemple #3
0
def read_state_file(filename):
    data = storable.retrieve(filename)
    assert 'spoolfetch' in data and 'value' in data
    return data['value'], data['spoolfetch']
def read_state_file(filename):
    data = storable.retrieve(filename)
    assert 'spoolfetch' in data and 'value' in data
    return data['value'], data['spoolfetch']
#!/usr/bin/python

import storable
import sys
import pprint

p = pprint.PrettyPrinter(indent=4)
for f in sys.argv[1:]:
    p.pprint(storable.retrieve(f))