------------------------------------------------------------
revno: 3748
committer: Jan Stransky <[email protected]>
timestamp: Wed 2013-11-06 15:47:35 +0100
message:
  Modified error message if not yade.runtime.hasDisplay (bug #1241817)
modified:
  gui/qt4/__init__.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to 
https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'gui/qt4/__init__.py'
--- gui/qt4/__init__.py	2012-08-23 12:04:26 +0000
+++ gui/qt4/__init__.py	2013-11-06 14:47:35 +0000
@@ -1,6 +1,11 @@
 # encoding: utf-8
 import yade.runtime
-if not yade.runtime.hasDisplay: raise ImportError("Connecting to DISPLAY at Yade startup failed, unable to activate the qt4 interface.")
+if not yade.runtime.hasDisplay:
+	msg = "Connecting to DISPLAY at Yade startup failed, unable to activate the qt4 interface."
+	import os
+	'YADE_BATCH' in os.environ:
+		msg += "\nDo not import qt when running in batch mode."
+	raise ImportError(msg)
 
 from PyQt4.QtGui import *
 from PyQt4 import QtCore

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to