diff options
author | Johan Dahlin <johan@src.gnome.org> | 2006-08-14 13:04:47 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2006-08-14 13:04:47 +0000 |
commit | de266009a77b10771fa7df3286fc7833b7778481 (patch) | |
tree | 1bfe7f75ce4fcca49f740259c85a743648bf568c | |
parent | 69ed12481e27f2a8598a6624def0b25794b5dc15 (diff) | |
download | pygtk-de266009a77b10771fa7df3286fc7833b7778481.tar.gz |
issue a warning instead of printing to stdout, fixes #316877 regression.
* gtk/__init__.py (_init): issue a warning instead of printing
to stdout, fixes #316877 regression. (Jeremey Katz)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | gtk/__init__.py | 3 |
3 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-08-14 Johan Dahlin <jdahlin@async.com.br> + + * gtk/__init__.py (_init): issue a warning instead of printing + to stdout, fixes #316877 regression. + 2006-08-12 John Finlay <finlay@moeraki.com> * docs/style.css: Add. @@ -1,3 +1,6 @@ +pygtk-2.9.7 ?-?-2006 + - Issue a warning when a DISPLAY is not set (#316877, Johan, Jeremey Katz) + pygtk-2.9.6 8-august-2006 - GtkTreePath can be converted from integers again (#350252, Gustavo, Sebastien Bacher) diff --git a/gtk/__init__.py b/gtk/__init__.py index 61fe50df..9f444eb2 100644 --- a/gtk/__init__.py +++ b/gtk/__init__.py @@ -65,7 +65,8 @@ def _init(): try: _gtk.init_check() except RuntimeError, e: - print >> sys.stderr, "WARNING: %s" % e + import warnings + warnings.warn(str(e), _gtk.Warning) finally: # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''), # which causes problems for pychecker, restore it if modified. |