Hi all,
I've attached a patch that changes the parsing of battery.runtime in
NUT-monitor from int to float.
This already happens for ups.temperature, charge and load.
Without this patch, I get a flood of "Invalid literal for int with base
10: '28500.00" errors.
Kind regards,
Sven
--- NUT-Monitor.orig 2012-07-31 19:38:56.000000000 +0200
+++ NUT-Monitor 2013-07-16 15:06:06.104504740 +0200
@@ -856,7 +856,7 @@
self.__parent_class._interface__widgets["progress_battery_load"].set_text( _("Not available") )
if ( vars.has_key( "battery.runtime" ) ) :
- autonomy = int(vars.get("battery.runtime",0))
+ autonomy = int( float( vars.get( "battery.runtime", 0 ) ) )
if ( autonomy >= 3600 ) :
info = time.strftime( _("<b>%H hours %M minutes %S seconds</b>"), time.gmtime( autonomy ) )
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev