[node-patches] Change in ovirt-node[master]: tools: Fix logger configuration
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Wed Sep 25 13:27:00 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: tools: Fix logger configuration
......................................................................
tools: Fix logger configuration
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011798
Change-Id: If5375a8776f9461e93e931030a234ec1d52a58da
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/tools/password.py
1 file changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/80/19580/1
diff --git a/src/ovirt/node/tools/password.py b/src/ovirt/node/tools/password.py
index 6e609b1..f2a1689 100644
--- a/src/ovirt/node/tools/password.py
+++ b/src/ovirt/node/tools/password.py
@@ -18,13 +18,16 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
-from ovirt.node.utils import security
-from ovirt.node.utils.security import password_check
import cmd
import getpass
import logging
import optparse
import sys
+
+logging.basicConfig(format='[%(levelname)s] %(message)s')
+
+from ovirt.node.utils import security
+from ovirt.node.utils.security import password_check
class PasswordTool(cmd.Cmd):
@@ -167,14 +170,9 @@
# Configure logging
lvl = logging.DEBUG if namespace.verbose else logging.INFO
- logging.basicConfig(level=lvl, format='[%(levelname)s] %(message)s')
+ logging.getLogger().setLevel(lvl)
# Setup CLI
cli = PasswordTool(namespace.verbose)
- #if namespace.command:
- # for command in namespace.command:
- # if command.strip():
- # cli.onecmd(command)
- #else:
cli.cmdloop()
--
To view, visit http://gerrit.ovirt.org/19580
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5375a8776f9461e93e931030a234ec1d52a58da
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list