old_contents: # This file is part of Indico.
  # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
  #
  # Indico is free software; you can redistribute it and/or
  # modify it under the terms of the GNU General Public License as
  # published by the Free Software Foundation; either version 3 of the
  # License, or (at your option) any later version.
  #
  # Indico is distributed in the hope that it will be useful, but
  # WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  # General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with Indico; if not, see <http://www.gnu.org/licenses/>.
  
  import os, errno
  
  def silentremove(filename):
      try:
          os.remove(filename)
      except OSError, e: # this would be "except OSError as e:" in python 3.x
          if e.errno != errno.ENOENT: # errno.ENOENT = no such file or directory
              raise # re-raise exception if a different error occured
  
  
  def delete_recursively(target):
      if os.path.isdir(target):
          for path, dirs, files in os.walk(target, topdown=False):
              for name in files:
                  os.remove(os.path.join(path, name))
              for name in dirs:
                  os.rmdir(os.path.join(path, name))
          os.rmdir(target)
      elif os.path.exists(target):
          os.remove(target)
  
new_contents: # This file is part of Indico.
  # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
  #
  # Indico is free software; you can redistribute it and/or
  # modify it under the terms of the GNU General Public License as
  # published by the Free Software Foundation; either version 3 of the
  # License, or (at your option) any later version.
  #
  # Indico is distributed in the hope that it will be useful, but
  # WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  # General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with Indico; if not, see <http://www.gnu.org/licenses/>.
  
  import errno
  import os
  
  def silentremove(filename):
      try:
          os.remove(filename)
      except OSError as e:
          if e.errno != errno.ENOENT:
              raise
  
subject: Remove unused function