def add_values_to_bundle_safe(connection, bundle, values):
    for value in values:
        try:
            connection.addValueToBundle(bundle, value)
        except YouTrackException, e:
            if e.response.status == 409:
                print "Value with name [ %s ] already exists in bundle [ %s ]" % \
                      (value.name.encode('utf-8'), bundle.name.encode('utf-8'))
            else:
                raise e
Adds values to specified bundle. Checks, whether each value already contains in bundle. If yes, it is not added.
dataset/ETHPy150Open gini/youtrack-githook/youtrack/importHelper.py/add_values_to_bundle_safe