diff options
author | Tim Harder <radhermit@gmail.com> | 2015-02-08 20:39:11 -0800 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2015-02-08 20:39:11 -0800 |
commit | ae44d2a309aefb23f59ea6c782f34ed768165c49 (patch) | |
tree | 43c17b6fe4393dbd3d06ea67d262a2775bbbe5f3 /bin | |
parent | config: don't fallback on loading /usr/share/portage/config/repos.conf (diff) | |
download | pkgcore-ae44d2a309aefb23f59ea6c782f34ed768165c49.tar.gz pkgcore-ae44d2a309aefb23f59ea6c782f34ed768165c49.tar.bz2 pkgcore-ae44d2a309aefb23f59ea6c782f34ed768165c49.zip |
drop unnecessary os.path import for wrapper scripts
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pwrapper | 7 | ||||
-rwxr-xr-x | bin/pwrapper_installed | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/bin/pwrapper b/bin/pwrapper index 7fc2bda2..d6d5a58c 100755 --- a/bin/pwrapper +++ b/bin/pwrapper @@ -9,15 +9,14 @@ sys.path unconditionally. from importlib import import_module import os -import os.path as osp import sys -sys.path.insert(1, osp.dirname(osp.dirname(osp.abspath(__file__)))) +sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) if __name__ == '__main__': try: from pkgcore.util import commandline - name = osp.basename(sys.argv[0]).replace("-", "_") + name = os.path.basename(sys.argv[0]).replace("-", "_") script = import_module('pkgcore.scripts.%s' % (name,)) except ImportError as e: sys.stderr.write(str(e) + '!\n') @@ -30,6 +29,6 @@ if __name__ == '__main__': sys.stderr.write('Add --debug to the commandline for a traceback.\n') sys.exit(1) - os.environ["PKGCORE_SCRIPT_PATH"] = osp.dirname(osp.abspath(__file__)) + os.environ["PKGCORE_SCRIPT_PATH"] = os.path.dirname(os.path.abspath(__file__)) subcommands = getattr(script, 'argparser', None) commandline.main(subcommands) diff --git a/bin/pwrapper_installed b/bin/pwrapper_installed index 883f9932..5c8a10d1 100755 --- a/bin/pwrapper_installed +++ b/bin/pwrapper_installed @@ -3,13 +3,13 @@ """Wrapper script that runs a pkgcore script from sys.path.""" from importlib import import_module -import os.path as osp +import os import sys if __name__ == '__main__': try: from pkgcore.util import commandline - name = osp.basename(sys.argv[0]).replace("-", "_") + name = os.path.basename(sys.argv[0]).replace("-", "_") script = import_module('pkgcore.scripts.%s' % (name,)) except ImportError as e: sys.stderr.write(str(e) + '!\n') |