Put media_domain warning on stderr to protect MR jobs.

For simple installs of reddit, g.domain == g.media_domain.  If this is
the case, the app will print a warning at startup.  However, this
warning was printed to stdout which meant that any jobs (such as the
mr_top stuff) using the output of a reddit process would get this
warning in their data streams. Bad times.
This commit is contained in:
Neil Williams
2014-02-12 21:16:39 -08:00
parent fc33bd301b
commit 5fae84cbd0

View File

@@ -424,7 +424,7 @@ class Globals(object):
if not self.media_domain:
self.media_domain = self.domain
if self.media_domain == self.domain:
print ("Warning: g.media_domain == g.domain. " +
print >> sys.stderr, ("Warning: g.media_domain == g.domain. " +
"This may give untrusted content access to user cookies")
for arg in sys.argv: