Commit 0dbc4db9 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Drop pbs dependency in favor of sh

PBS has now bocome sh.
parent b044e29e
......@@ -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)
......
......@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment