new_contents: 
  def str_to_int(string):
      """
      Parses a string number into an integer, optionally converting to a float
      and rounding down.
  
      Some LVM values may come with a comma instead of a dot to define decimals.
      This function normalizes a comma into a dot
      """
      error_msg = "Unable to convert to integer: '%s'" % str(string)
      try:
          integer = float(string.replace(',', '.'))
      except AttributeError:
          # this might be a integer already, so try to use it, otherwise raise
          # the original exception
          if isinstance(string, (int, float)):
              integer = string
          else:
              raise
  
      return int(integer)
  
subject: add a str-to-int helper