def backup_dir_exists(backup_dir):
 if (not os.path.exists(backup_dir)):
  logging.error('Error while accessing backup files.')
  logging.info('Please provide a valid backup directory.')
  return False
 return True

def backup_dir_exists ( backup_dir ) : if ( not os . path . exists ( backup_dir ) ) : logging . error ( 'Error while accessing backup files.' ) logging . info ( 'Please provide a valid backup directory.' ) return False return True
checks it the given backup directory exists .