Skip to content

Commit

Permalink
[*] cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
StyXman committed Dec 6, 2016
1 parent 85a5216 commit ca81d37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ayrton/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__ (self, name):
def __str__ (self):
return "CommandNotFound or NameError: command %(name)s not found or name %(name)s is not defined" % self.__dict__


def which(program):
def is_exe(fpath):
return os.path.exists(fpath) and os.access(fpath, os.X_OK)
Expand All @@ -79,6 +80,7 @@ def is_exe(fpath):

return None


def resolve_program(program):
path = which(program)
if not path:
Expand Down Expand Up @@ -146,6 +148,7 @@ def __init__ (self, path):


def prepare_fds (self):
"""Create needed file descriptors (pipes, mostly) before forking."""
if '_in' in self.options:
i= self.options['_in']
logger.debug ('_in: %r', i)
Expand Down

0 comments on commit ca81d37

Please sign in to comment.