Commits

Colin Copeland committed 880fa67

pep8

Comments (0)

Files changed (2)

         self.databases = set(databases)
         if not os.path.exists(self.dest):
             os.makedirs(self.dest)
-        self.logger = logging.getLogger('dbbu.%s' % self.host.replace('.', '-'))
+        self.logger = \
+            logging.getLogger('dbbu.%s' % self.host.replace('.', '-'))
 
     def execute(self, cmd, comm=True, **kwargs):
         if 'stderr' not in kwargs:
         else:
             args = {'user': ''}
         return 'sudo %(user)s %(cmd)s'.format(args)
-    
+
     def chmod(self, path):
         os.chmod(path, self.fmod)
-    
-    
 
 
 class PostgreSQL(Backup):

scripts/dbbu-run.py

 
 ALLOWED_LEVELS = ('NOTSET', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')
 logger = logging.getLogger('dbbu')
-formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)-8s %(message)s',
-                              datefmt='%a, %d %b %Y %H:%M:%S')
+formatter = \
+    logging.Formatter('%(asctime)s %(name)s %(levelname)-8s %(message)s',
+                      datefmt='%a, %d %b %Y %H:%M:%S')
+
 
 def setup_logging(cfg):
     log_level = cfg.get('default', 'log_level')
     else:
         log_level = getattr(logging, log_level)
     logger.setLevel(log_level)
-    
+
     if cfg.has_option('default', 'log_file'):
         log_file = cfg.get('default', 'log_file')
         handler = logging.handlers.RotatingFileHandler(log_file,
         handler.setFormatter(formatter)
         logger.addHandler(handler)
 
+
 def main():
     (options, cfg_path) = parser.parse_args()
     if not cfg_path:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.