Permalink
Browse files

BUG: Start server with .pyc, .pyo also if needed.

This can happen if for some reason supplement is installed or shipped as
.pyc files and without the .py files.
  • Loading branch information...
1 parent 6f60f95 commit e9f2f29aa96d3c439bd260cbb81892b2f4a78a19 @prabhuramachandran committed Feb 24, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 supplement/remote.py
View
@@ -44,7 +44,12 @@ def _run(self):
else:
addr = arbitrary_address('AF_UNIX')
- supp_server = os.path.join(os.path.dirname(__file__), 'server.py')
+ for ext in ('.py', '.pyc', '.pyo'):
+ supp_server = os.path.join(os.path.dirname(__file__), 'server' + ext)
+ if os.path.exists(supp_server):
+ break
+ else:
+ raise RuntimeError('Unable to find supplement server, %s'%supp_server)
args = [self.executable, supp_server, addr] + self.extra_args
env = None

0 comments on commit e9f2f29

Please sign in to comment.