def getUnitString(s):
  if s.startswith('s'): return 'seconds'
  if s.startswith('min'): return 'minutes'
  if s.startswith('h'): return 'hours'
  if s.startswith('d'): return 'days'
  if s.startswith('w'): return 'weeks'
  if s.startswith('mon'): return 'months'
  if s.startswith('y'): return 'years'
  raise Exception, s % "Invalid offset unit '%s'"
dataset/ETHPy150Open tmm1/graphite/webapp/graphite/render/attime.py/getUnitString/swapped operands of `%`