Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pathos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
sys.exit(0)
try:
myinp = sys.argv[1]
except: myinp = None
except IndexError: myinp = None
if myinp:
rhost = myinp #XXX: should test rhost validity here... (how ?)
else: pass # use default
Expand All @@ -84,7 +84,7 @@
# get server to run from user
try:
myinp = sys.argv[2]
except: myinp = None
except IndexError: myinp = None
if myinp:
server = myinp #XXX: should test validity here... (filename)
else: pass # use default
Expand All @@ -101,7 +101,7 @@
# get remote port to run server on from user
try:
myinp = sys.argv[3]
except: myinp = None
except IndexError: myinp = None
if myinp:
if tunnel: # tunnel doesn't take more inputs
msg = "port '%s' not valid for 'tunnel'" % myinp
Expand All @@ -117,7 +117,7 @@
# get remote profile (this should go away soon)
try:
myinp = sys.argv[4]
except: myinp = None
except IndexError: myinp = None
if myinp:
rprof = myinp #XXX: should test validity here... (filename)
profiles = {rhost:rprof}
Expand Down
2 changes: 1 addition & 1 deletion pathos/abstract_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __pipe(self, f, *args, **kwds): #FIXME: need to think about this...
raise TypeError("%s() takes at most %s arguments (%s given)" % (f.__name__(), str(vars), str(arglen)))
elif arglen < (vars - defs):
raise TypeError("%s() takes at least %s arguments (%s given)" % (f.__name__(), str(vars - defs), str(arglen)))
except:
except Exception:
pass
return
def _serve(self, *args, **kwds):
Expand Down
4 changes: 2 additions & 2 deletions pathos/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ def _execute(self):
p = Popen(self.message, shell=True,
stdin=self.stdin, stdout=PIPE,
stderr=STDOUT, close_fds=True)
except:
except Exception:
raise PipeException('failure to pipe: %s' % self.message)
self._pid = p.pid #get fileobject pid
self._stdout = p.stdout #save fileobject
else:
try:
p = Popen(self.message, shell=True,
stdin=self.stdin, stdout=PIPE)
except:
except Exception:
raise PipeException('failure to pipe: %s' % self.message)
self._stdout = p.stdout
self._pid = 0 #XXX: MMM --> or -1 ?
Expand Down
2 changes: 1 addition & 1 deletion pathos/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def randomport(host=None):
launcher.launch()
try:
rport = int(launcher.response())
except:
except Exception:
from pathos.secure import TunnelException
raise TunnelException("failure to pick remote port")
# return remote port number
Expand Down