Skip to content

Commit

Permalink
exception handling for server process creation
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Jul 19, 2013
1 parent 8ef1346 commit 832e0cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python-api/gstswitch/server.py
Expand Up @@ -72,10 +72,10 @@ def _start_process(self, cmd):
try:
tempf = open(os.devnull, 'w')
process = subprocess.Popen(cmd.split(), stdout=tempf, stderr=tempf, bufsize=-1, shell=False)
except IOError:
print "Cannot open os.devnull"
except OSError:
print "gst-switch-srv not found in path"
except IOError as e:
print "I/O error: os.devnull: {0}".format(e.strerror)
except OSError as e:
print "OS error: {0}: {1}".format(cmd, e.strerror)
return process

def terminate(self):
Expand Down

0 comments on commit 832e0cb

Please sign in to comment.