All pastes #927867 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-04 16:32 UTC
rendered paste body
# Only use this function for individual pkg build directories
def user_makedirs(target, u_uid, u_gid):
        os.setegid(u_gid)
        os.seteuid(u_uid)

        '''import pdb
        pdb.set_trace()
        if os.path.exists(target)
                rmtree(target)'''

        os.makedirs(target)
        os.seteuid(uid)
        os.setegid(gid)