2 # Copyright 2010 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
7 sys.path.insert(0, os.environ['PORTAGE_PYM_PATH'])
12 if args and sys.hexversion < 0x3000000 and not isinstance(args[0], unicode):
13 for i, x in enumerate(args):
14 args[i] = portage._unicode_decode(x, errors='strict')
16 # Make locks quiet since unintended locking messages displayed on
17 # stdout would corrupt the intended output of this program.
18 portage.locks._quiet = True
19 lock_obj = portage.locks.lockfile(args[0], wantnewlockfile=True)
20 sys.stdout.write('\0')
23 portage.locks.unlockfile(lock_obj)
24 return portage.os.EX_OK
26 if __name__ == "__main__":
27 rval = main(sys.argv[1:])