Changeset - 8f29ddc4c147
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 16 years ago 2010-03-01 11:29:40

fixed the backup script path problems
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/backup_manager.py
Show inline comments
 
@@ -7,17 +7,18 @@ import sys
 
logging.basicConfig(level = logging.DEBUG,
 
                    format = "%(asctime)s %(levelname)-5.5s %(message)s")
 

	
 
class BackupManager(object):
 
    def __init__(self):
 

	
 
        cur_dir = os.path.realpath(__file__)
 
        dn = os.path.dirname
 
        self.backup_file_path = os.path.join(dn(dn(dn(__file__))), 'data')
 
        self.backup_file_path = os.path.join(dn(dn(dn(cur_dir))), 'data')
 
        cfg = config.config()
 
        try:
 
            cfg.read(os.path.join(dn(dn(dn(__file__))), 'hgwebdir.config'))
 
            cfg.read(os.path.join(dn(dn(dn(cur_dir))), 'hgwebdir.config'))
 
        except IOError:
 
            logging.error('Could not read hgwebdir.config')
 
            sys.exit()
 
        self.set_repos_path(cfg.items('paths'))
 
        logging.info('starting backup for %s', self.repos_path)
 
        logging.info('backup target %s', self.backup_file_path)
0 comments (0 inline, 0 general)