diff options
Diffstat (limited to 'portage_with_autodep/bin/clean_locks')
-rwxr-xr-x | portage_with_autodep/bin/clean_locks | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/portage_with_autodep/bin/clean_locks b/portage_with_autodep/bin/clean_locks index 8c4299c..184e80c 100755 --- a/portage_with_autodep/bin/clean_locks +++ b/portage_with_autodep/bin/clean_locks @@ -1,21 +1,17 @@ #!/usr/bin/python -O -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function import sys, errno -try: - import portage -except ImportError: - from os import path as osp - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - import portage - -from portage import os +from os import path as osp +pym_path = osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym") +sys.path.insert(0, pym_path) +import portage +portage._internal_caller = True if not sys.argv[1:] or "--help" in sys.argv or "-h" in sys.argv: - import portage print() print("You must specify directories with hardlink-locks to clean.") print("You may optionally specify --force, which will remove all") |