Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: third_party/twisted_8_1/twisted/persisted/journal/picklelog.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/twisted_8_1/twisted/persisted/journal/picklelog.py
diff --git a/third_party/twisted_8_1/twisted/persisted/journal/picklelog.py b/third_party/twisted_8_1/twisted/persisted/journal/picklelog.py
deleted file mode 100644
index eae6a30bcf4139c40d64f3c7b3ce34ea29eb8412..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/persisted/journal/picklelog.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-#
-# -*- test-case-name: twisted.test.test_journal -*-
-
-"""Logging that uses pickles.
-
-TODO: add log that logs to a file.
-"""
-
-# twisted imports
-from twisted.persisted import dirdbm
-from twisted.internet import defer
-from zope.interface import implements
-
-# sibling imports
-import base
-
-
-class DirDBMLog:
- """Log pickles to DirDBM directory."""
-
- implements(base.ICommandLog)
-
- def __init__(self, logPath):
- self.db = dirdbm.Shelf(logPath)
- indexs = map(int, self.db.keys())
- if indexs:
- self.currentIndex = max(indexs)
- else:
- self.currentIndex = 0
-
- def logCommand(self, command, time):
- """Log a command."""
- self.currentIndex += 1
- self.db[str(self.currentIndex)] = (time, command)
- return defer.succeed(1)
-
- def getCurrentIndex(self):
- """Return index of last command logged."""
- return self.currentIndex
-
- def getCommandsSince(self, index):
- result = []
- for i in range(index, self.currentIndex + 1):
- result.append(self.db[str(i)])
- return result

Powered by Google App Engine
This is Rietveld 408576698