Skip to content

Commit

Permalink
Using os.path.join for generating Server path
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Dec 20, 2014
1 parent aea7f1f commit 3228ec8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions python-api/gstswitch/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,13 @@ def _run_process(self):
if not self.path:
srv_location = spawn.find_executable('gst-switch-srv')
if srv_location:
cmd = '/'.join(srv_location.split('/')[:-1])
cmd = srv_location
else:
raise PathError("Cannot find gst-switch-srv in $PATH.\
Please specify the path.")
else:
if self.path[-1] == '/':
cmd = self.path[:-1]
else:
cmd = self.path
cmd += '/'
cmd += """gst-switch-srv \
{0} \
cmd += os.path.join(self.path, 'gst-switch-srv')
cmd += """ {0} \
--video-input-port={1} \
--audio-input-port={2} \
--control-port={3} \
Expand Down

0 comments on commit 3228ec8

Please sign in to comment.