Silence pychecker and pylint warnings
[public/pyceo-broken.git] / pylib / csc / apps / urwid / positions.py
index 489be5a..285afd3 100644 (file)
@@ -31,7 +31,6 @@ class IntroPage(WizardPanel):
 
 class InfoPage(WizardPanel):
     def init_widgets(self):
-        if not members.connected(): members.connect()
         self.widgets = [
             urwid.Text( "Positions" ),
             urwid.Divider(),
@@ -57,6 +56,11 @@ class InfoPage(WizardPanel):
         for (position, widget) in self.position_widgets.iteritems():
             self.state['positions'][position] = \
                 self.parse(widget.get_edit_text())
+            for p in self.state['positions'][position]:
+                if members.get(p) == None:
+                    self.focus_widget(widget)
+                    set_status( "Invalid username: '%s'" % p )
+                    return True
         clear_status()
 
 class EndPage(WizardPanel):