- raw = self.store.lowlevel_open(segment + ".tar.gpg")
-
- (input, output) = os.popen2("lbs-filter-gpg --decrypt")
- def copy_thread(src, dst):
- BLOCK_SIZE = 4096
- while True:
- block = src.read(BLOCK_SIZE)
- if len(block) == 0: break
- dst.write(block)
- dst.close()
-
- thread.start_new_thread(copy_thread, (raw, input))
- return output
+
+ for (extension, filter) in SEGMENT_FILTERS:
+ try:
+ raw = self.store.lowlevel_open(segment + ".tar" + extension)
+
+ (input, output) = os.popen2(filter)
+ def copy_thread(src, dst):
+ BLOCK_SIZE = 4096
+ while True:
+ block = src.read(BLOCK_SIZE)
+ if len(block) == 0: break
+ dst.write(block)
+ dst.close()
+
+ thread.start_new_thread(copy_thread, (raw, input))
+ return output
+ except:
+ pass
+
+ raise cumulus.store.NotFoundError