From: Nikos Skalkotos Date: Mon, 22 Oct 2012 14:46:20 +0000 (+0300) Subject: Drop pbs dependency in favor of sh X-Git-Tag: v0.1~7 X-Git-Url: https://code.grnet.gr/git/snf-image-creator/commitdiff_plain/0dbc4db9360f0effe8b346607a6c0a432863609c Drop pbs dependency in favor of sh PBS has now bocome sh. --- diff --git a/image_creator/util.py b/image_creator/util.py index bd34222..61cc2a6 100644 --- a/image_creator/util.py +++ b/image_creator/util.py @@ -32,7 +32,7 @@ # or implied, of GRNET S.A. import sys -import pbs +import sh import hashlib @@ -45,12 +45,12 @@ def get_command(command): search_paths = ['/usr/local/sbin', '/usr/sbin', '/sbin'] for fullpath in map(lambda x: "%s/%s" % (x, command), search_paths): if os.path.exists(fullpath) and os.access(fullpath, os.X_OK): - return pbs.Command(fullpath) + return sh.Command(fullpath) raise exception try: - return pbs.__getattr__(command) - except pbs.CommadNotFount as e: + return sh.__getattr__(command) + except sh.CommadNotFount as e: return find_sbin_command(command, e) diff --git a/setup.py b/setup.py index ee15b44..58cecb9 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ setup( license='BSD', packages=find_packages(), include_package_data=True, - install_requires=['pbs', 'ansicolors', 'progress>=1.0.2', 'pysendfile'], + install_requires=['sh', 'ansicolors', 'progress>=1.0.2', 'pysendfile'], entry_points={ 'console_scripts': [ 'snf-image-creator = image_creator.main:main',