[svn] r3546 - trunk/tools/dstat

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Fri Sep 2 18:47:47 CEST 2005


Author: dag
Date: 2005-09-02 18:47:46 +0200 (Fri, 02 Sep 2005)
New Revision: 3546

Modified:
   trunk/tools/dstat/Makefile
   trunk/tools/dstat/dstat
Log:
Updates

Modified: trunk/tools/dstat/Makefile
===================================================================
--- trunk/tools/dstat/Makefile	2005-09-02 11:13:38 UTC (rev 3545)
+++ trunk/tools/dstat/Makefile	2005-09-02 16:47:46 UTC (rev 3546)
@@ -7,15 +7,7 @@
 all:
 	@echo "No build phase."
 
-%.html: %.txt
-	asciidoc -b xhtml11 -d manpage $<
-%: %.xml
-	xmlto man $<
-
-%.xml: %.txt
-	asciidoc -b docbook -d manpage $<
-
-install: dstat.1 dstat.html
+install: dstat.1 dstat.1.html
 #	-[ ! -f $(DESTDIR)$(sysconfdir)/dstat.conf ] && install -D -m0644 dstat.conf $(DESTDIR)$(sysconfdir)/dstat.conf
 	install -Dp -m0755 dstat $(DESTDIR)$(bindir)/dstat
 	install -Dp -m0644 dstat.1 $(DESTDIR)$(mandir)/man1/dstat.1
@@ -52,3 +44,12 @@
 			s|, time$$|, time, string|g; \
 		' >dstat15.tr
 	@chmod a+x dstat15.tr
+
+%.html: %.txt
+	asciidoc -b xhtml11 -d manpage $<
+
+%.1: %.1.xml
+	xmlto man $<
+
+%.xml: %.txt
+	asciidoc -b docbook -d manpage $<

Modified: trunk/tools/dstat/dstat
===================================================================
--- trunk/tools/dstat/dstat	2005-09-02 11:13:38 UTC (rev 3545)
+++ trunk/tools/dstat/dstat	2005-09-02 16:47:46 UTC (rev 3546)
@@ -801,6 +801,7 @@
 		self.fd.seek(0)
 		for line in self.fd.readlines():
 			l = line.split()
+			if not l: continue
 			if l[0] != 'intr': continue
 			for name in self.vars:
 				self.cn2[name] = long(l[int(name) + 2])
@@ -1323,7 +1324,7 @@
 	return pipes[cmd]
 
 def readpipe(file, tmout = 0.001):
-	"Read available data from pipe in a non-blocking fasion"
+	"Read available data from pipe in a non-blocking fashion"
 	ret = ''
 	while not select.select([file.fileno()], [], [], tmout)[0]:
 		pass




More information about the commits mailing list