Beispiel #1
0
def loadOrgs(add, file):
    if not os.path.isfile(file):
        print 'file not found ', file
        sys.exit(1)
    fobj = open(file, 'r')
    reader = csv.reader(fobj)
    for row in reader:
        if add:
            print 'add ', row
            datawake_mysql.addOrgLink(row[0], row[1])
        else:
            print 'delete ', row
            datawake_mysql.deleteOrgLink(row[0], row[1])
    fobj.close()
Beispiel #2
0
def loadOrgs(add, file):
    if not os.path.isfile(file):
        print 'file not found ', file
        sys.exit(1)
    fobj = open(file, 'r')
    reader = csv.reader(fobj)
    for row in reader:
        if add:
            print 'add ', row
            datawake_mysql.addOrgLink(row[0], row[1])
        else:
            print 'delete ', row
            datawake_mysql.deleteOrgLink(row[0], row[1])
    fobj.close()
Beispiel #3
0
def loadUser(user,org,add):
    if add:
        datawake_mysql.addOrgLink(user, org)
    else:
        datawake_mysql.deleteOrgLink(user, org)
Beispiel #4
0
def loadUser(user, org, add):
    if add:
        datawake_mysql.addOrgLink(user, org)
    else:
        datawake_mysql.deleteOrgLink(user, org)