Cthulhu n00b
Joined: 15 Aug 2002 Posts: 40 Location: Manchester, UK/Athens, Greece
|
Posted: Sat Oct 04, 2003 8:12 pm Post subject: gdesklet networkinfo large value problem [fix (?)] |
|
|
After a long downloading spree my Network Info desklet stopped working. I fiddled a bit around with it and found out that when I was trying to start it it, gdesklets was returning this error:
Code: | Unhandled exception in thread:
Traceback (most recent call last):
File "./Network/__init__.py", line 146, in __command_thread
File "./Network/__init__.py", line 90, in __get_net_in_out
ValueError: int() literal too large: 3759093521 |
I checked the code in /usr/share/gdesklets/Sensors/Network/__init__.py and the program was trying to cast the values for the in/out displays into integers. So I changed the following line from
Code: | line: 89
return int(fields[1]),int(fields[9]) |
to
Code: | return long(fields[1]),long(fields[9]) |
After changing this, I restarted the desklet and it worked fine. I you encounter the same problem just backup the file and try it
PS. I don't know s**t about python so if casting the values into long ints is bad please correct me |
|