Commits

Anonymous committed e3a09b0

Discovered that hosts must be of the form host_example.org for a given domain example.org. Added a check for this.

  • Participants
  • Parent commits 876d88f

Comments (0)

Files changed (3)

 import time
 import logging
 import subprocess
+#import pdb
+#pdb.set_trace()
 
 
 __all__ = (
         if self.user:
             remote_cmd.extend(['-l', self.user])
         remote_cmd.extend([self.host, cmd])
+        self.logger.debug(remote_cmd)
         return self.execute(' '.join(remote_cmd), **kwargs)
 
     def sudo(self, cmd):
         if self.sudo_user:
             sudo_cmd.append('-u %s' % self.sudo_user)
         sudo_cmd.append(cmd)
+        self.logger.debug(sudo_cmd)
         return ' '.join(sudo_cmd)
 
     def chmod(self, path):

File scripts/dbbu-run.py

     }
     engines = []
     hosts = [s for s in cfg.sections() if s.startswith('host_')]
+    if not hosts:
+        err = u'No hosts defined. Hosts are of the form host_example.org for a given domain example.org\n\n'
+        logger.error(err)
+        sys.stderr.write(err)
     for host in hosts:
         data = {'host': host[5:]}
         if cfg.has_option(host, 'user'):
-from distutils.core import setup
-
+from setuptools import setup, find_packages
 
 setup(
     name="dbbu",
     version="0.1.0",
-    py_modules=['dbbu'],
+    packages=find_packages(),
     scripts=[
         'scripts/dbbu-run.py',
     ],