def get_ofs():
 storage_backend = config['ofs.impl']
 kw = {}
 for (k, v) in config.items():
  if ((not k.startswith('ofs.')) or (k == 'ofs.impl')):
   continue
  kw[k[4:]] = v
 if ((storage_backend == 'pairtree') and ('storage_dir' in kw)):
  create_pairtree_marker(kw['storage_dir'])
 ofs = get_impl(storage_backend)(**kw)
 return ofs

def get_ofs ( ) : storage_backend = config [ 'ofs.impl' ] kw = { } for ( k , v ) in config . items ( ) : if ( ( not k . startswith ( 'ofs.' ) ) or ( k == 'ofs.impl' ) ) : continue kw [ k [ 4 : ] ] = v if ( ( storage_backend == 'pairtree' ) and ( 'storage_dir' in kw ) ) : create_pairtree_marker ( kw [ 'storage_dir' ] ) ofs = get_impl ( storage_backend ) ( ** kw ) return ofs
return a configured instance of the appropriate ofs driver .