helmuthdu / conky_colors

CONKY-colors is an easier way to configure Conky
GNU General Public License v3.0
123 stars 39 forks source link

Some bug with devicename in "conkyHD[1-4].py" #51

Open EvgeniusDragon opened 10 years ago

EvgeniusDragon commented 10 years ago

The root path "/" not named to "Root"

BUT! When change this string: if (device is "/"): to if(device == "/"):

the script work fine.

I dont know, maybe this bug work only me. (Debian 7.4, Python2 and Python3) But this example work good:

$ >>> device = "/" $ >>> if (device is "/"): $ ... devicename="Root" $ ... $ >>> print (""+devicename+"") $ Root

android-808 commented 10 years ago

i do remember having siilar issues when i did some work resolving issues before. i think in this scenario the code should be patched to be == instead. is keyword should be used to test identity rather than equality iirc.

android-808 commented 10 years ago

sorry to double post but it won't let me edit at the moment on phone. i'll try it with Arch when i get home. I can patch it if it fails here as well.