From 6f55c17f48d7608072199496fbcefa33f2e97bf0 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 15:39:28 +0100 Subject: Replaced ordered dict with standard version; used logging module All performance tests still print to stderr, but do so in a py3 compatible way --- git/objects/submodule/root.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'git/objects/submodule/root.py') diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py index 871cc21c..708749c7 100644 --- a/git/objects/submodule/root.py +++ b/git/objects/submodule/root.py @@ -5,10 +5,12 @@ from util import ( from git.exc import InvalidGitRepositoryError import git -import sys +import logging __all__ = ["RootModule", "RootUpdateProgress"] +log = logging.getLogger('git.objects.submodule.root') + class RootUpdateProgress(UpdateProgress): @@ -247,8 +249,8 @@ class RootModule(Submodule): # this way, it will be checked out in the next step # This will change the submodule relative to us, so # the user will be able to commit the change easily - print >> sys.stderr, "WARNING: Current sha %s was not contained in the tracking\ - branch at the new remote, setting it the the remote's tracking branch" % sm.hexsha + log.warn("Current sha %s was not contained in the tracking\ + branch at the new remote, setting it the the remote's tracking branch", sm.hexsha) sm.binsha = rref.commit.binsha # END reset binsha -- cgit v1.2.1