small fixes

This commit is contained in:
Sheppy
2017-07-17 15:25:01 +02:00
parent 26f5100c6c
commit cafa0e880e
2 changed files with 7 additions and 4 deletions

View File

@@ -67,11 +67,11 @@ def get_color(nr,start,end):
def guthaben():
guthaben = ''
if hl_utils.is_cip():
tmp = -1
raw = ""
with open(hl_utils.hlpath("pracct.log")) as f:
tmp = float(f.read());
guthaben = "Druckerguthaben: " + str(tmp) + " Euro"
col = get_color(tmp,0,COLOR_BORDER)
raw = f.read();
guthaben = "Druckerguthaben: " + raw + " Euro"
col = get_color(float(raw),0,COLOR_BORDER)
guthaben = color_panel(guthaben,col)
return guthaben;