Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Fixed a problem with strings and CSV output in dstat_time and dstat_a…
Browse files Browse the repository at this point in the history
…pp (Vinod Kutty)
  • Loading branch information
dagwieers committed Feb 9, 2007
1 parent 1c9cf8c commit 9600c8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -3,6 +3,7 @@
- Added tcp6 and udp6 statistics within dstat_tcp and dstat_udp
- Added module readlines() taking care of seek() and multiple files
- Improved module exception messages
- Fixed a problem with strings and CSV output in dstat_time and dstat_app (Vinod Kutty)

* 0.6.4 - Ahoy - released 12/12/2006
- Fixed dstat_clock to use localtime() instead of gmtime()
Expand Down
9 changes: 6 additions & 3 deletions dstat
Expand Up @@ -425,6 +425,8 @@ class dstat:
line = line + printcsv(val)
if j + 1 != len(self.val[name]):
line = line + ','
elif isinstance(self.val[name], types.StringType):
line = line + self.val[name]
else:
line = line + printcsv(self.val[name])
if i + 1 != len(self.vars):
Expand Down Expand Up @@ -1246,17 +1248,18 @@ class dstat_time(dstat):
self.name = 'time'
self.format = ('s', 14, 0)
self.nick = ('date/time',)
self.vars = self.nick
self.vars = ('time',)
self.init(self.vars, 1)

def extract(self):
pass
self.val['time'] = time.strftime('%d-%m %H:%M:%S', time.localtime())

def show(self):
if step == op.delay:
color = 'silver'
else:
color = 'gray'
return ansi[color] + time.strftime('%d-%m %H:%M:%S', time.localtime())
return ansi[color] + self.val['time']

class dstat_udp(dstat):
def __init__(self):
Expand Down

0 comments on commit 9600c8b

Please sign in to comment.