def main():
    uids = {}
    gids = {}

    debug('ORIG %s' % str(sys.argv))

    IDS = '/etc/ids.tables'

    try:
        exec(open(IDS).read())
    except __HOLE__:
        pass
    parse(open('/etc/passwd').read(), uids)
    parse(open('/etc/group').read(), gids, True)
    parse_cmdline(sys.argv, uids, gids)
    #
    debug('REWRITTEN %s' % str(sys.argv))
    ret = subprocess.call(sys.argv)
    if ret != 0:
        sys.exit(ret)
    #
    parse(open('/etc/passwd').read(), uids)
    parse(open('/etc/group').read(), gids, True)
    #
    out = open(IDS, 'w')
    print('uids = ', file=out, end='')
    pprint.pprint(uids, out)
    print('gids = ', file=out, end='')
    pprint.pprint(gids, out)
    out.close()
dataset/ETHPy150Open redhat-cip/software-factory/image/edeploy/mngids.py/main