<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -59,7 +59,14 @@ class server(object):
         self.assert_status('stopped')
         if not args:
             args = self.args
-        process = subprocess.Popen(args, env=self.env, **kwargs)
+        try:
+            process = subprocess.Popen(args, env=self.env, **kwargs)
+        except OSError, x:
+            if x.errno == 2:
+                    raise DiscoError(&quot;%s not found. &quot;\
+                            &quot;Is it in your PATH?&quot; % args[0])
+            else:
+                    raise
         if process.wait():
             raise DiscoError(&quot;Failed to start %s&quot; % self)
         yield '%s started' % self
@@ -224,7 +231,13 @@ def main():
     if not os.path.exists(DISCO_CONF):
         DISCO_CONF = &quot;/etc/disco&quot;
 
-    sys.path.extend([DISCO_PATH, sys.path.pop(0)])
+    # disco.py and the disco package are ambiguous. Move the local directory
+    # to the end of the list, to make sure that the disco package is preferred
+    # over disco.py.
+    sys.path.append(sys.path.pop(0))
+    # Prefer local Disco over system-wide installation
+    sys.path.insert(0, DISCO_PATH)
+
     from disco.settings import DiscoSettings
 
     usage = &quot;&quot;&quot;</diff>
      <filename>bin/disco.py</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ class DiscoSettings(dict):
         'DISCO_ERLANG':          &quot;guess_erlang()&quot;,
         'DISCO_HTTPD':           &quot;'lighttpd'&quot;,
         'DISCO_WWW_ROOT':        &quot;os.path.join(DISCO_MASTER_HOME, 'www')&quot;,
-        'PYTHONPATH':            &quot;'%s:%s' % (os.getenv('PYTHONPATH', ''), DISCO_PATH)&quot;,
+        'PYTHONPATH':            &quot;DISCO_PATH&quot;,
         'DISCO_SCHEDULER':       &quot;'fair'&quot;,
         'DISCO_SCHEDULER_ALPHA': &quot;.001&quot;,
         }</diff>
      <filename>pydisco/disco/settings.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2f79c69879b4b5f565eb8023d680f91d6b787641</id>
    </parent>
  </parents>
  <author>
    <name>Ville Tuulos</name>
    <email>tuulos@dxfront.(none)</email>
  </author>
  <url>http://github.com/tuulos/disco/commit/dc3a5e36b66f1346a216e33c43b19f60c6b074e6</url>
  <id>dc3a5e36b66f1346a216e33c43b19f60c6b074e6</id>
  <committed-date>2009-09-09T16:44:10-07:00</committed-date>
  <authored-date>2009-09-09T16:44:10-07:00</authored-date>
  <message>Fixed a PYTHONPATH issue in disco.py</message>
  <tree>a636cf6cbdadc3546aaaf716a14f0be09172278d</tree>
  <committer>
    <name>Ville Tuulos</name>
    <email>tuulos@dxfront.(none)</email>
  </committer>
</commit>
