Permalink
Browse files

fixed obscure bugs

  • Loading branch information...
1 parent 9c4015c commit f8a9506b9828dc69e47c1b471e1c88ff2d5c02bc @trey0 trey0 committed Jun 16, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 geocamPycroraptor/LocalTask.py
@@ -147,7 +147,10 @@ def start0(self, params={}, restart=0):
for k, v in params.iteritems():
self._env[k] = v # may want to remove these later
- cmdArgs = shlex.split(self._getConfig('cmd'))
+ # without str() call, getConfig result is unicode in Python 2.7
+ # and shlex.split fails
+ cmdArgs = shlex.split(str(self._getConfig('cmd')))
+
self._logBuffer = Log.LineBuffer()
if self._env['log'] == None:
self._logFile = None
@@ -185,7 +188,7 @@ def start0(self, params={}, restart=0):
except OSError, oe:
if oe.errno == errno.ENOENT:
startupError = "is executable '%s' in PATH? Popen call returned no such file or directory" % cmdArgs[0]
- except Error, exc:
+ except Exception, exc:
startupError = str(exc)
else:
startupError = None

0 comments on commit f8a9506

Please sign in to comment.