[Python-modules-commits] r13302 - in packages/python-whisper/trunk/debian (4 files)
statik-guest at users.alioth.debian.org
statik-guest at users.alioth.debian.org
Mon Jun 7 21:22:04 UTC 2010
Date: Monday, June 7, 2010 @ 21:21:50
Author: statik-guest
Revision: 13302
Updating to new upstream version, dropping cleanup-assertions patch that
is now included upstream, and added some missing escapes in the man page.
Modified:
packages/python-whisper/trunk/debian/changelog
packages/python-whisper/trunk/debian/patches/series
packages/python-whisper/trunk/debian/rrd2whisper.1
Deleted:
packages/python-whisper/trunk/debian/patches/cleanup-assertions
Modified: packages/python-whisper/trunk/debian/changelog
===================================================================
--- packages/python-whisper/trunk/debian/changelog 2010-06-07 19:55:00 UTC (rev 13301)
+++ packages/python-whisper/trunk/debian/changelog 2010-06-07 21:21:50 UTC (rev 13302)
@@ -1,4 +1,4 @@
-python-whisper (0.9.5-1) UNRELEASED; urgency=low
+python-whisper (0.9.6-1) UNRELEASED; urgency=low
* Initial release (Closes: #563765)
Deleted: packages/python-whisper/trunk/debian/patches/cleanup-assertions
===================================================================
--- packages/python-whisper/trunk/debian/patches/cleanup-assertions 2010-06-07 19:55:00 UTC (rev 13301)
+++ packages/python-whisper/trunk/debian/patches/cleanup-assertions 2010-06-07 21:21:50 UTC (rev 13302)
@@ -1,90 +0,0 @@
-Description: Convert some asserts to exceptions instead.
-Forwarded: https://code.launchpad.net/~statik/graphite/cleanup-assertions/+merge/18780
-Author: Elliot Murphy <elliot at ubuntu.com>
-Last-Update: 2010-02-07
-=== modified file 'whisper/whisper.py'
---- whisper/whisper.py 2009-11-02 06:47:51 +0000
-+++ whisper/whisper.py 2010-02-07 18:32:13 +0000
-@@ -53,6 +53,23 @@
-
- debug = startBlock = endBlock = lambda *a,**k: None
-
-+
-+class WhisperException(Exception):
-+ """Base class for whisper exceptions."""
-+
-+
-+class InvalidConfiguration(WhisperException):
-+ """Invalid configuration."""
-+
-+
-+class InvalidTimeInterval(WhisperException):
-+ """Invalid time interval."""
-+
-+
-+class TimestampNotCovered(WhisperException):
-+ """Timestamp not covered by any archives in this database."""
-+
-+
- def enableDebug():
- global open, debug, startBlock, endBlock
- class open(file):
-@@ -136,21 +153,28 @@
- xFilesFactor specifies the fraction of data points in a propagation interval that must have known values for a propagation to occur
- """
- #Validate archive configurations...
-- assert archiveList, "You must specify at least one archive configuration!"
-+ if not archiveList:
-+ raise InvalidConfiguration("You must specify at least one archive configuration!")
- archiveList.sort(key=lambda a: a[0]) #sort by precision (secondsPerPoint)
- for i,archive in enumerate(archiveList):
- if i == len(archiveList) - 1: break
- next = archiveList[i+1]
-- assert archive[0] < next[0],\
-- "You cannot configure two archives with the same precision %s,%s" % (archive,next)
-- assert (next[0] % archive[0]) == 0,\
-- "Higher precision archives' precision must evenly divide all lower precision archives' precision %s,%s" % (archive[0],next[0])
-+ if not (archive[0] < next[0]):
-+ raise InvalidConfiguration("You cannot configure two archives "
-+ "with the same precision %s,%s" % (archive,next))
-+ if (next[0] % archive[0]) != 0:
-+ raise InvalidConfiguration("Higher precision archives' precision "
-+ "must evenly divide all lower precision archives' precision %s,%s" \
-+ % (archive[0],next[0]))
- retention = archive[0] * archive[1]
- nextRetention = next[0] * next[1]
-- assert nextRetention > retention,\
-- "Lower precision archives must cover larger time intervals than higher precision archives %s,%s" % (archive,next)
-+ if not (nextRetention > retention):
-+ raise InvalidConfiguration("Lower precision archives must cover "
-+ "larger time intervals than higher precision archives %s,%s" \
-+ % (archive,next))
- #Looks good, now we create the file and write the header
-- assert not os.path.exists(path), "File %s already exists!" % path
-+ if os.path.exists(path):
-+ raise InvalidConfiguration("File %s already exists!" % path)
- fh = open(path,'wb')
- if LOCK: fcntl.flock( fh.fileno(), fcntl.LOCK_EX )
- lastUpdate = struct.pack( timestampFormat, int(time.time()) )
-@@ -251,7 +275,9 @@
- if timestamp is None: timestamp = now
- timestamp = int(timestamp)
- diff = now - timestamp
-- assert diff < header['maxRetention'] and diff >= 0, "Timestamp not covered by any archives in this database"
-+ if not ((diff < header['maxRetention']) and diff >= 0):
-+ raise TimestampNotCovered("Timestamp not covered by any archives in "
-+ "this database.")
- for i,archive in enumerate(header['archives']): #Find the highest-precision archive that covers timestamp
- if archive['retention'] < diff: continue
- lowerArchives = header['archives'][i+1:] #We'll pass on the update to these lower precision archives later
-@@ -445,7 +471,8 @@
- if fromTime < oldestTime:
- fromTime = oldestTime
-
-- assert fromTime < untilTime, "Invalid time interval"
-+ if not (fromTime < untilTime):
-+ raise InvalidTimeInterval("Invalid time interval")
- if untilTime > now:
- untilTime = now
- if untilTime < fromTime:
-
Modified: packages/python-whisper/trunk/debian/patches/series
===================================================================
--- packages/python-whisper/trunk/debian/patches/series 2010-06-07 19:55:00 UTC (rev 13301)
+++ packages/python-whisper/trunk/debian/patches/series 2010-06-07 21:21:50 UTC (rev 13302)
@@ -1 +0,0 @@
-cleanup-assertions
Modified: packages/python-whisper/trunk/debian/rrd2whisper.1
===================================================================
--- packages/python-whisper/trunk/debian/rrd2whisper.1 2010-06-07 19:55:00 UTC (rev 13301)
+++ packages/python-whisper/trunk/debian/rrd2whisper.1 2010-06-07 21:21:50 UTC (rev 13302)
@@ -14,11 +14,11 @@
.SH OPTIONS
.TP
.B
---xFilesFactor
+\-\-xFilesFactor
The fraction of data points in a propagation interval that must have known values for a propagation to occur.
.TP
.B
--h, --help
+\-h, \-\-help
Show the embedded help.
.SH AUTHOR
\fBwhisper\fP is a fixed size database, created by Chris Davis.
More information about the Python-modules-commits
mailing list