Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cms/sources.py

Issue 5076874740891648: Issue 2456 - [cms] Use logging module (Closed)
Patch Set: Created May 5, 2015, 1:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cms/bin/test_server.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/sources.py
===================================================================
--- a/cms/sources.py
+++ b/cms/sources.py
@@ -21,9 +21,9 @@
import os
from StringIO import StringIO
import subprocess
-import sys
import urlparse
import zipfile
+import logging
class Source:
def resolve_link(self, url, locale):
@@ -59,7 +59,7 @@
if not has_locale(locale, alternative_page):
locale = default_locale
else:
- print >>sys.stderr, "Warning: Link to %s cannot be resolved" % page
+ logging.warning("Link to %s cannot be resolved", page)
parts = page.split("/")
if parts[-1] == default_page:
« no previous file with comments | « cms/bin/test_server.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld