Permalink
Browse files

Detect when teacher is already running or unable to run

  • Loading branch information...
1 parent 8f8fa1c commit 84eb94f30f127e894900e33ae86321063584c5c1 @eugeni committed Jul 7, 2011
Showing with 5 additions and 2 deletions.
  1. +0 −1 TODO
  2. +5 −1 teacher.py
View
@@ -3,7 +3,6 @@ TODO list for openclass
For version 1.0:
- Within notification window, allow to open received files.
-- Use proper notification when teacher is already running
- Add configuration GUI
- Support default response for dialogs
- Support persistent actions
View
@@ -942,7 +942,11 @@ def cb_machine(self, widget, event, machine):
gtk.gdk.threads_enter()
logger.info("Starting broadcast..")
# Main service service
- service = TeacherRunner(logger, config)
+ try:
+ service = TeacherRunner(logger, config)
+ except:
+ logger.error(_("Unable to start teacher, or teacher is already running"))
+ sys.exit(0)
# Main interface
gui = TeacherGui(service, logger, config)
service.start()

0 comments on commit 84eb94f

Please sign in to comment.