Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# or implied, of GRNET S.A. # or implied, of GRNET S.A.
import sys import sys
import pbs import sh
import hashlib import hashlib
...@@ -45,12 +45,12 @@ def get_command(command): ...@@ -45,12 +45,12 @@ def get_command(command):
search_paths = ['/usr/local/sbin', '/usr/sbin', '/sbin'] search_paths = ['/usr/local/sbin', '/usr/sbin', '/sbin']
for fullpath in map(lambda x: "%s/%s" % (x, command), search_paths): for fullpath in map(lambda x: "%s/%s" % (x, command), search_paths):
if os.path.exists(fullpath) and os.access(fullpath, os.X_OK): if os.path.exists(fullpath) and os.access(fullpath, os.X_OK):
return pbs.Command(fullpath) return sh.Command(fullpath)
raise exception raise exception
try: try:
return pbs.__getattr__(command) return sh.__getattr__(command)
except pbs.CommadNotFount as e: except sh.CommadNotFount as e:
return find_sbin_command(command, e) return find_sbin_command(command, e)
......
...@@ -46,7 +46,7 @@ setup( ...@@ -46,7 +46,7 @@ setup(
license='BSD', license='BSD',
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
install_requires=['pbs', 'ansicolors', 'progress>=1.0.2', 'pysendfile'], install_requires=['sh', 'ansicolors', 'progress>=1.0.2', 'pysendfile'],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'snf-image-creator = image_creator.main:main', 'snf-image-creator = image_creator.main:main',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment