bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, sinc... | def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, sinc... | 27,400 |
def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, sinc... | def pack(self, t, referencesf): """Copy data from the current database file to a packed file Non-current records from transactions with time-stamp strings less than packtss are ommitted. As are all undone records. Also, data back pointers that point before packtss are resolved and the associated data are copied, sinc... | 27,401 |
def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | 27,402 |
def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | 27,403 |
def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | 27,404 |
def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | def shift_transactions_forward(index, vindex, tindex, file, pos, opos): """Copy transactions forward in the data file This might be done as part of a recovery effort """ # Cache a bunch of methods seek=file.seek read=file.read write=file.write tappend=tindex.append index_get=index.get vindex_get=vindex.get # Initia... | 27,405 |
def search_back(file, pos): seek=file.seek read=file.read seek(0,2) s=p=file.tell() while p > pos: seek(p-8) l=u64(read(8)) if l <= 0: break p=p-l-8 return p, s | def search_back(file, pos): seek=file.seek read=file.read seek(0,2) s=p=file.tell() while p > pos: seek(p-8) l=U64(read(8)) if l <= 0: break p=p-l-8 return p, s | 27,406 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4L, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, nam... | 27,407 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,408 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,409 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,410 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,411 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,412 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,413 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,414 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,415 |
def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name... | 27,416 |
def _loadBack(file, oid, back): seek=file.seek read=file.read while 1: old=u64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return read(u64(plen)), serial back=read(8) # We got a back pointer! | def _loadBack(file, oid, back): seek=file.seek read=file.read while 1: old=U64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return read(u64(plen)), serial back=read(8) # We got a back pointer! | 27,417 |
def _loadBack(file, oid, back): seek=file.seek read=file.read while 1: old=u64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return read(u64(plen)), serial back=read(8) # We got a back pointer! | def _loadBack(file, oid, back): seek=file.seek read=file.read while 1: old=u64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return read(U64(plen)), serial back=read(8) # We got a back pointer! | 27,418 |
def _loadBackPOS(file, oid, back): seek=file.seek read=file.read while 1: old=u64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return old back=read(8) # We got a back pointer! | def _loadBackPOS(file, oid, back): seek=file.seek read=file.read while 1: old=U64(back) if not old: raise KeyError, oid seek(old) h=read(42) doid,serial,prev,tloc,vlen,plen = unpack(">8s8s8s8sH8s", h) if vlen: seek(vlen+16,1) if plen != z64: return old back=read(8) # We got a back pointer! | 27,419 |
def __init__(self, file): if type(file) is type(''): file=open(file, 'r+b') self._file=file if file.read(4) != packed_version: raise FileStorageFormatError, name file.seek(0,2) self._file_size=file.tell() self._pos=4 | def __init__(self, file): if type(file) is type(''): file=open(file, 'r+b') self._file=file if file.read(4) != packed_version: raise FileStorageFormatError, name file.seek(0,2) self._file_size=file.tell() self._pos=4 | 27,420 |
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | 27,421 |
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | 27,422 |
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | 27,423 |
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | 27,424 |
def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): file=self._file seek=file.seek read=file.read pos=self._pos | 27,425 |
def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | 27,426 |
def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | 27,427 |
def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | def next(self, index=0): name='' pos = self._pos tend, file, seek, read, tpos = self._stuff while pos < tend: # Read the data records for this transaction | 27,428 |
def wait(self, msgid): """Invoke asyncore mainloop and wait for reply.""" if __debug__: log("wait() async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): self.trigger.pull_trigger() | def wait(self, msgid): """Invoke asyncore mainloop and wait for reply.""" if __debug__: log("wait(%d), async=%d" % (msgid, self.is_async()), level=zLOG.TRACE) if self.is_async(): self.trigger.pull_trigger() | 27,429 |
def wait(self, msgid): """Invoke asyncore mainloop and wait for reply.""" if __debug__: log("wait() async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): self.trigger.pull_trigger() | def wait(self, msgid): """Invoke asyncore mainloop and wait for reply.""" if __debug__: log("wait() async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): self.trigger.pull_trigger() | 27,430 |
def testItemsWorks(self): for x in range(100): self.t[x] = 2*x v = self.t.items() i = 0 for x in v: self.assertEqual(x[0], i) self.assertEqual(x[1], 2*i) i += 1 | def def testItemsNegativeIndex(self): L = [-3, 6, -11, 4] for i in L: self.t[i] = i L.sort() items = self.t.items() for i in range(-1, -4, -1): self.assertEqual(items[i], (L[i], L[i])) self.assertRaises(IndexError, lambda: items[-5]) testItemsWorks(self): def testItemsNegativeIndex(self): L = [-3, 6, -11, 4] for i in L... | 27,431 |
def log(message, level=zLOG.BLATHER, label=None, error=None): zLOG.LOG(label or _label, level, message, error=error) | def log(message, level=zLOG.BLATHER, label=None, error=None): label = label or _label if LOG_THREAD_ID: label = "%s:%s" % (label, threading.currentThread().getName()) zLOG.LOG(label, level, message, error=error) | 27,432 |
def checkSize(self): # XXX need to fix return self.assertEqual(self.db.cacheSize(), 0) self.assertEqual(self.db.cacheDetailSize(), []) | def checkSize(self): # XXX need to fixself.assertEqual(self.db.cacheSize(), 0) self.assertEqual(self.db.cacheDetailSize(), []) | 27,433 |
def checkSize(self): # XXX need to fix return self.assertEqual(self.db.cacheSize(), 0) self.assertEqual(self.db.cacheDetailSize(), []) | def checkSize(self): # XXX need to fix return self.assertEqual(self.db.cacheSize(), 0) self.assertEqual(self.db.cacheDetailSize(), []) | 27,434 |
def checkDetail(self): # XXX need to fix return CACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | def checkDetail(self): # XXX need to fixCACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | 27,435 |
def checkDetail(self): # XXX need to fix return CACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | def checkDetail(self): # XXX need to fix return CACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | 27,436 |
def checkDetail(self): # XXX need to fix return CACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | def checkDetail(self): # XXX need to fix return CACHE_SIZE = 10 self.db.setCacheSize(CACHE_SIZE) | 27,437 |
def out_of_band_hook( code, args, get_hook={ 'b': (invalidator.begin, 0), 'i': (invalidator.invalidate, 1), 'e': (invalidator.end, 0), 'I': (invalidator.Invalidate, 1), 'r': (self._commit_lock_release, 0), 's': (self._serials.append, 1), 'S': (self._info.update, 1), }.get): | def out_of_band_hook( code, args, get_hook={ 'b': (invalidator.begin, 0), 'i': (invalidator.invalidate, 1), 'e': (invalidator.end, 0), 'I': (invalidator.Invalidate, 1), 'U': (self._commit_lock_release, 0), 's': (self._serials.append, 1), 'S': (self._info.update, 1), }.get): | 27,438 |
def test_suite(): return unittest.makeSuite(StorageTestCase) | def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(StorageTestCase)) import BDBStorage if BDBStorage.is_available: suite.addTest(unittest.makeSuite(BDBStorageTests)) return suite | 27,439 |
def testMergeEmpty(self): base, b1, b2, bm, e1, e2, items = self._setupConflict() | def testMergeEmpty(self): base, b1, b2, bm, e1, e2, items = self._setupConflict() | 27,440 |
def testMergeEmpty(self): base, b1, b2, bm, e1, e2, items = self._setupConflict() | def testMergeEmpty(self): base, b1, b2, bm, e1, e2, items = self._setupConflict() | 27,441 |
def testEmptyBucketConflict(self): # Tests that an emptied bucket *created by* conflict resolution is # viewed as a conflict: conflict resolution doesn't have enough # info to unlink the empty bucket from the BTree correctly. b = self.t for i in range(0, 200, 4): b[i] = i # bucket 0 has 15 values: 0, 4 .. 56 # bucket ... | def testEmptyBucketConflict(self): # Tests that an emptied bucket *created by* conflict resolution is # viewed as a conflict: conflict resolution doesn't have enough # info to unlink the empty bucket from the BTree correctly. b = self.t for i in range(0, 200, 4): b[i] = i # bucket 0 has 15 values: 0, 4 .. 56 # bucket ... | 27,442 |
def _finishCommit(self, txn): self.logger.debug("%s: commit", txn) try: for r in txn._resources: r.commit(txn) txn._status = Status.COMMITTED except: # An error occured during the second phase of 2PC. We can # no longer guarantee the system is in a consistent state. # The best we can do is abort() all the resource man... | def _finishCommit(self, txn): self.logger.debug("%s: commit", txn) try: for r in txn._resources: r.commit(txn) txn._status = Status.COMMITTED except: # An error occured during the second phase of 2PC. We can # no longer guarantee the system is in a consistent state. # The best we can do is abort() all the resource man... | 27,443 |
def _finishCommit(self, txn): self.logger.debug("%s: commit", txn) try: for r in txn._resources: r.commit(txn) txn._status = Status.COMMITTED except: # An error occured during the second phase of 2PC. We can # no longer guarantee the system is in a consistent state. # The best we can do is abort() all the resource man... | def _finishCommit(self, txn): self.logger.debug("%s: commit", txn) try: for r in txn._resources: r.commit(txn) txn._status = Status.COMMITTED except: # An error occured during the second phase of 2PC. We can # no longer guarantee the system is in a consistent state. # The best we can do is abort() all the resource man... | 27,444 |
def checkLoadSerial(self): oid = self._storage.new_oid() revid = ZERO revisions = {} for i in range(31, 38): revid = self._dostore(oid, revid=revid, data=MinPO(i)) revisions[revid] = MinPO(i) # Now make sure all the revisions have the correct value for revid, value in revisions.items(): data = self._storage.loadSerial(... | defcheckLoadSerial(self):oid=self._storage.new_oid()revid=ZEROrevisions={}foriinrange(31,38):revid=self._dostore(oid,revid=revid,data=MinPO(i))revisions[revid]=MinPO(i)#Nowmakesurealltherevisionshavethecorrectvalueforrevid,valueinrevisions.items():data=self._storage.loadSerial(oid,revid)assertzodb_unpickle(data)==value | 27,445 |
def next(self, index=0): if self._file is None: # A closed iterator. XXX: Is IOError the best we can do? For # now, mimic a read on a closed file. raise IOError, 'iterator is closed' file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): if self._file is None: # A closed iterator. XXX: Is IOError the best we can do? For # now, mimic a read on a closed file. raise IOError, 'iterator is closed' file=self._file seek=file.seek read=file.read pos=self._pos | 27,446 |
def next(self, index=0): if self._file is None: # A closed iterator. XXX: Is IOError the best we can do? For # now, mimic a read on a closed file. raise IOError, 'iterator is closed' file=self._file seek=file.seek read=file.read pos=self._pos | def next(self, index=0): if self._file is None: # A closed iterator. XXX: Is IOError the best we can do? For # now, mimic a read on a closed file. raise IOError, 'iterator is closed' file=self._file seek=file.seek read=file.read pos=self._pos | 27,447 |
def note(self, text): if self.description: self.description = "%s\n\n%s" % (self.description, test.strip()) else: self.description = text.strip() | def note(self, text): if self.description: self.description = "%s\n\n%s" % (self.description, text.strip()) else: self.description = text.strip() | 27,448 |
def resume(self, txn): if self._current is not None: raise TransactionError("Can't resume while other " "transaction is active") self._suspended.remove(txn) self._current = txn | def resume(self, txn): if self._current is not None: raise TransactionError("Can't resume while other " "transaction is active") self._suspended.remove(txn) self._current = txn | 27,449 |
def pending(self): """Invoke mainloop until any pending messages are handled.""" if __debug__: log("pending(), async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): return # Inline the asyncore poll() function to know whether any input # was actually read. Repeat until no input is ready. # XXX This only d... | def pending(self): """Invoke mainloop until any pending messages are handled.""" if __debug__: log("pending(), async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): return # Inline the asyncore poll() function to know whether any input # was actually read. Repeat until no input is ready. # XXX This only d... | 27,450 |
def pending(self): """Invoke mainloop until any pending messages are handled.""" if __debug__: log("pending(), async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): return # Inline the asyncore poll() function to know whether any input # was actually read. Repeat until no input is ready. # XXX This only d... | def pending(self): """Invoke mainloop until any pending messages are handled.""" if __debug__: log("pending(), async=%d" % self.is_async(), level=zLOG.TRACE) if self.is_async(): return # Inline the asyncore poll() function to know whether any input # was actually read. Repeat until no input is ready. # XXX This only d... | 27,451 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_txn_header(f, pos, file_size, outp, ltid): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction len... | 27,452 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record f.seek(pos) h = f.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction length at ... | 27,453 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl = u64(stl) if pos + (tl + 8) > file_size: error("bad transaction length at %s", pos) if status... | 27,454 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,455 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,456 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,457 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,458 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,459 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,460 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,461 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,462 |
def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | def read_transaction_header(file, pos, file_size): # Read the transaction record file.seek(pos) h = file.read(23) if len(h) < 23: raise EOFError tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el tl=u64(stl) if status=='c': raise EOFError if pos+(tl+8) > file_size: error("bad transaction leng... | 27,463 |
def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | 27,464 |
def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | 27,465 |
def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | 27,466 |
def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | def scan(file, pos): """Return a potential transaction location following pos in file. This routine scans forward from pos looking for the last data record in a transaction. A period '.' always occurs at the end of a pickle, and an 8-byte transaction length follows the last pickle. If a period is followed by a plaus... | 27,467 |
def iprogress(i): if i % 2: print '.', else: print (i/2) % 10, sys.stdout.flush() | def iprogress(i): if i % 2: print ".", else: print (i/2) % 10, sys.stdout.flush() | 27,468 |
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], "fv:pP:") except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | 27,469 |
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == "-v": verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | 27,470 |
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == "-p": partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | 27,471 |
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == "-f": force = 1 elif opt == '-P': pack = time.time() - f... | 27,472 |
def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == '-P': pack = time.time() - f... | def main(): try: opts, (inp, outp) = getopt.getopt(sys.argv[1:], 'fv:pP:') except getopt.error: die() print __doc__ % argv[0] force = partial = verbose = 0 pack = None for opt, v in opts: if opt == '-v': verbose = int(v) elif opt == '-p': partial = 1 elif opt == '-f': force = 1 elif opt == "-P": pack = time.time() - f... | 27,473 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print "Recovering", inp, "into", outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,474 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) f = open(inp, "rb") if f.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs = ZOD... | 27,475 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") f.seek(0,2) file_size = f.tell() ofs = ZOD... | 27,476 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,477 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,478 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,479 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,480 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,481 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,482 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,483 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,484 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,485 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,486 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,487 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,488 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,489 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,490 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,491 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,492 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,493 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,494 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,495 |
def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | def recover(inp, outp, verbose=0, partial=0, force=0, pack=0): print 'Recovering', inp, 'into', outp if os.path.exists(outp) and not force: die("%s exists" % outp) file = open(inp, "rb") if file.read(4) != ZODB.FileStorage.packed_version: die("input is not a file storage") file.seek(0,2) file_size = file.tell() ofs... | 27,496 |
def parentdir(p, n=1): """Return the parent of p, n levels up.""" d = p while n: d = os.path.split(d)[0] if not d or d == '.': d = os.getcwd() n -= 1 return d | def parentdir(p, n=1): """Return the ancestor of p from n levels up.""" d = p while n: d = os.path.split(d)[0] if not d or d == '.': d = os.getcwd() n -= 1 return d | 27,497 |
def parentdir(p, n=1): """Return the parent of p, n levels up.""" d = p while n: d = os.path.split(d)[0] if not d or d == '.': d = os.getcwd() n -= 1 return d | def parentdir(p, n=1): """Return the parent of p, n levels up.""" d = p while n: d = os.path.dirname(d) if not d or d == '.': d = os.getcwd() n -= 1 return d | 27,498 |
def handle_read(self): self.recv(8192) self.lock.acquire() try: for thunk in self.thunks: try: thunk() except: nil, t, v, tbinfo = asyncore.compact_traceback() print ('exception in trigger thunk:' ' (%s:%s %s)' % (t, v, tbinfo)) self.thunks = [] finally: self.lock.release() | def handle_read(self): self.recv(8192) self.lock.acquire() try: for thunk in self.thunks: try: thunk() except: nil, t, v, tbinfo = asyncore.compact_traceback() print ('exception in trigger thunk:' ' (%s:%s %s)' % (t, v, tbinfo)) self.thunks = [] finally: self.lock.release() | 27,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.