Skip to content

Commit

Permalink
Correct syntax for Python 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuksan committed Feb 10, 2011
1 parent 6ab7f38 commit 33c1dc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion diskfree/python_modules/diskfree.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,17 @@ def metric_init(lparams):
else:
path_key = mount_info[1][1:].replace('/', '_')

if PARAMS['unit_type'] == 'percent':
units = "%"
else:
units = 'GB'

descriptors.append({
'name': NAME_PREFIX + path_key,
'call_back': get_value,
'time_max': 60,
'value_type': 'float',
'units': '%' if PARAMS['unit_type'] == 'percent' else 'GB',
'units': units,
'slope': 'both',
'format': '%f',
'description': "Disk space available on %s" % mount_info[1],
Expand Down

0 comments on commit 33c1dc7

Please sign in to comment.