Drop pbs dependency in favor of sh
authorNikos Skalkotos <skalkoto@grnet.gr>
Mon, 22 Oct 2012 14:46:20 +0000 (17:46 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Mon, 22 Oct 2012 14:46:20 +0000 (17:46 +0300)
PBS has now bocome sh.

image_creator/util.py
setup.py

index bd34222..61cc2a6 100644 (file)
@@ -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)
 
 
index ee15b44..58cecb9 100755 (executable)
--- 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',