PyRRD upstream patch

re-submit upstream patch for pyrrd. this time it should not be mangled.

Signed-of-by: Roberto Riggio <roberto.riggio@create-net.org

git-svn-id: svn://svn.openwrt.org/openwrt/packages@30992 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-03-18 20:56:30 +00:00
parent 9ec10c9555
commit 85049d7ba0
2 changed files with 33 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=pyrrd
PKG_VERSION:=0.1.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=PyRRD-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/P/PyRRD/
@ -27,7 +27,7 @@ define Package/pyrrd
CATEGORY:=Languages
TITLE:=PyRRD - An Object-Oriented Python Interface for RRDTool
URL:=http://code.google.com/p/pyrrd/
DEPENDS:=+python +distribute
DEPENDS:=+python +distribute +rrdtool
endef
define Package/pyrrd/description

View File

@ -0,0 +1,31 @@
--- a/pyrrd/backend/external.py 2011-10-19 05:33:13 +0000
+++ b/pyrrd/backend/external.py 2011-10-19 05:44:55 +0000
@@ -262,7 +262,7 @@
data += [unicode(x) for x in obj.rra]
return (obj.filename, params + data)
- if function == 'update':
+ elif function == 'update':
validParams = ['template']
params = common.buildParameters(obj, validParams)
FIRST_VALUE = 0
@@ -275,15 +275,15 @@
data = [data for data, nil in obj.values]
return (obj.filename, params + data)
- if function == 'fetch':
+ elif function == 'fetch':
validParams = ['resolution', 'start', 'end']
params = common.buildParameters(obj, validParams)
- return (obj.filename, obj.cf, params)
+ return (obj.filename, [obj.cf] + params)
- if function == 'info':
+ elif function == 'info':
return (obj.filename, obj)
- if function == 'graph':
+ elif function == 'graph':
validParams = ['start', 'end', 'step', 'title',
'vertical_label', 'width', 'height', 'only_graph',
'upper_limit', 'lower_limit', 'rigid', 'alt_autoscale',