Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdesklet networkinfo large value problem [fix (?)]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Cthulhu
n00b
n00b


Joined: 15 Aug 2002
Posts: 40
Location: Manchester, UK/Athens, Greece

PostPosted: Sat Oct 04, 2003 8:12 pm    Post subject: gdesklet networkinfo large value problem [fix (?)] Reply with quote

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 :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum