def open_display(): pygtk = import_pygtk() try: import gtk except RuntimeError, e: if str(e) == "could not open display": raise NoDisplayError
def run(self, other_branch=None): pygtk = import_pygtk() try: import gtk except RuntimeError, e: if str(e) == "could not open display": raise NoDisplayError