summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2006-08-14 13:04:47 +0000
committerJohan Dahlin <johan@src.gnome.org>2006-08-14 13:04:47 +0000
commitde266009a77b10771fa7df3286fc7833b7778481 (patch)
tree1bfe7f75ce4fcca49f740259c85a743648bf568c
parent69ed12481e27f2a8598a6624def0b25794b5dc15 (diff)
downloadpygtk-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--ChangeLog5
-rw-r--r--NEWS3
-rw-r--r--gtk/__init__.py3
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f7bc1a03..dc975669 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index b0007daf..b290e09a 100644
--- a/NEWS
+++ b/NEWS
@@ -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.