]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Update cinder-manage to use FLAGS.log_dir.
authorDan Prince <dprince@redhat.com>
Tue, 19 Feb 2013 17:46:03 +0000 (12:46 -0500)
committerDan Prince <dprince@redhat.com>
Tue, 19 Feb 2013 17:46:03 +0000 (12:46 -0500)
We no longer use FLAGS.logdir. This commit updates
cinder-manage to use the new FLAGS.log_dir option instead.

Fixes LP Bug #1130258.

Change-Id: Id5f1175ec83f0f0b677ab0d75b310fa054459319

bin/cinder-manage

index fd98d33821eff77f6206aa0b976f8af95ea32750..8ee253af1f0390d2647319d0850a0c74cebd6a23 100755 (executable)
@@ -596,10 +596,10 @@ class GetLogCommands(object):
     def errors(self):
         """Get all of the errors from the log files."""
         error_found = 0
-        if FLAGS.logdir:
-            logs = [x for x in os.listdir(FLAGS.logdir) if x.endswith('.log')]
+        if FLAGS.log_dir:
+            logs = [x for x in os.listdir(FLAGS.log_dir) if x.endswith('.log')]
             for file in logs:
-                log_file = os.path.join(FLAGS.logdir, file)
+                log_file = os.path.join(FLAGS.log_dir, file)
                 lines = [line.strip() for line in open(log_file, "r")]
                 lines.reverse()
                 print_name = 0