diff options
author | Chuck Thier <cthier@gmail.com> | 2010-08-20 00:42:38 +0000 |
---|---|---|
committer | Chuck Thier <cthier@gmail.com> | 2010-08-20 00:42:38 +0000 |
commit | 2c596c0a0fbb0a1ec74092278d9f8844b90bf760 (patch) | |
tree | 89d9f398d91d6d3cdc6941788de8cb3b842f96ea /bin/swift-account-auditor | |
parent | dab46ea017a104a0965c547c08243d0a491e94e6 (diff) | |
download | swift-2c596c0a0fbb0a1ec74092278d9f8844b90bf760.tar.gz |
Initial commit of middleware refactor
Diffstat (limited to 'bin/swift-account-auditor')
-rwxr-xr-x | bin/swift-account-auditor | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/swift-account-auditor b/bin/swift-account-auditor index 2bbb73c23..cba89e9e6 100755 --- a/bin/swift-account-auditor +++ b/bin/swift-account-auditor @@ -34,21 +34,20 @@ if __name__ == '__main__': print "Unable to read config file." sys.exit(1) - server_conf = dict(c.items('account-server')) if c.has_section('account-auditor'): - auditor_conf = dict(c.items('account-auditor')) + conf = dict(c.items('account-auditor')) else: print "Unable to find account-auditor config section in %s." % \ sys.argv[1] sys.exit(1) - logger = utils.get_logger(auditor_conf, 'account-auditor') + logger = utils.get_logger(conf) # log uncaught exceptions sys.excepthook = lambda *exc_info: \ logger.critical('UNCAUGHT EXCEPTION', exc_info=exc_info) sys.stdout = sys.stderr = utils.LoggerFileObject(logger) - utils.drop_privileges(server_conf.get('user', 'swift')) + utils.drop_privileges(conf.get('user', 'swift')) try: os.setsid() @@ -62,7 +61,7 @@ if __name__ == '__main__': signal.signal(signal.SIGTERM, kill_children) - auditor = AccountAuditor(server_conf, auditor_conf) + auditor = AccountAuditor(conf) if once: auditor.audit_once() else: |