Revision 0dbc4db9 image_creator/util.py
b/image_creator/util.py | ||
---|---|---|
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 | 34 |
import sys |
35 |
import pbs
|
|
35 |
import sh
|
|
36 | 36 |
import hashlib |
37 | 37 |
|
38 | 38 |
|
... | ... | |
45 | 45 |
search_paths = ['/usr/local/sbin', '/usr/sbin', '/sbin'] |
46 | 46 |
for fullpath in map(lambda x: "%s/%s" % (x, command), search_paths): |
47 | 47 |
if os.path.exists(fullpath) and os.access(fullpath, os.X_OK): |
48 |
return pbs.Command(fullpath)
|
|
48 |
return sh.Command(fullpath)
|
|
49 | 49 |
raise exception |
50 | 50 |
|
51 | 51 |
try: |
52 |
return pbs.__getattr__(command)
|
|
53 |
except pbs.CommadNotFount as e:
|
|
52 |
return sh.__getattr__(command)
|
|
53 |
except sh.CommadNotFount as e:
|
|
54 | 54 |
return find_sbin_command(command, e) |
55 | 55 |
|
56 | 56 |
|
Also available in: Unified diff