forked from M-Labs/artiq
gui: better display of None
This commit is contained in:
parent
263ff86e66
commit
fd795724f2
|
@ -10,6 +10,8 @@ def force_spinbox_value(spinbox, value):
|
||||||
|
|
||||||
|
|
||||||
def short_format(v):
|
def short_format(v):
|
||||||
|
if v is None:
|
||||||
|
return "None"
|
||||||
t = type(v)
|
t = type(v)
|
||||||
if t is int or t is float:
|
if t is int or t is float:
|
||||||
return str(v)
|
return str(v)
|
||||||
|
|
Loading…
Reference in New Issue