Silence pychecker and pylint warnings
[public/pyceo-broken.git] / pylib / csc / apps / urwid / main.py
index bb6a2bc..43f7ca7 100644 (file)
@@ -1,5 +1,5 @@
-import random, time, re
-import urwid, urwid.curses_display
+import random
+import urwid.curses_display
 
 from csc.apps.urwid.widgets import *
 from csc.apps.urwid.window import *
 
 from csc.apps.urwid.widgets import *
 from csc.apps.urwid.window import *
@@ -9,7 +9,6 @@ import csc.apps.urwid.info as info
 import csc.apps.urwid.search as search
 import csc.apps.urwid.positions as positions
 import csc.apps.urwid.groups as groups
 import csc.apps.urwid.search as search
 import csc.apps.urwid.positions as positions
 import csc.apps.urwid.groups as groups
-from csc.apps.urwid.error import *
 
 from csc.adm import accounts, members, terms
 from csc.common.excep import InvalidArgument
 
 from csc.adm import accounts, members, terms
 from csc.common.excep import InvalidArgument
@@ -34,10 +33,10 @@ def program_name():
         "Embryonic", "Emigrant", "Emissary's", "Emoting", "Employment", "Emulated",
         "Enabling", "Enamoring", "Encapsulated", "Enchanted", "Encoded", "Encrypted",
         "Encumbered", "Endemic", "Enhanced", "Enigmatic", "Enlightened", "Enormous",
         "Embryonic", "Emigrant", "Emissary's", "Emoting", "Employment", "Emulated",
         "Enabling", "Enamoring", "Encapsulated", "Enchanted", "Encoded", "Encrypted",
         "Encumbered", "Endemic", "Enhanced", "Enigmatic", "Enlightened", "Enormous",
-        "Enrollment", "Enshrouded", "Ephermal", "Epidemic", "Episodic", "Epsilon",
+        "Enrollment", "Enshrouded", "Ephemeral", "Epidemic", "Episodic", "Epsilon",
         "Equitable", "Equestrian", "Equilateral", "Erroneous", "Erratic",
         "Espresso", "Essential", "Estate", "Esteemed", "Eternal", "Ethical", "Eucalyptus",
         "Equitable", "Equestrian", "Equilateral", "Erroneous", "Erratic",
         "Espresso", "Essential", "Estate", "Esteemed", "Eternal", "Ethical", "Eucalyptus",
-        "Euphemistic", "Envangelist", "Evasive", "Everyday", "Evidence", "Eviction", "Evildoer's",
+        "Euphemistic", "Evangelist", "Evasive", "Everyday", "Evidence", "Eviction", "Evildoer's",
         "Evolution", "Exacerbation", "Exalted", "Examiner's", "Excise", "Exciting", "Exclusion",
         "Exec", "Executioner's", "Exile", "Existential", "Expedient", "Expert", "Expletive",
         "Exploiter's", "Explosive", "Exponential", "Exposing", "Extortion", "Extraction",
         "Evolution", "Exacerbation", "Exalted", "Examiner's", "Excise", "Exciting", "Exclusion",
         "Exec", "Executioner's", "Exile", "Existential", "Expedient", "Expert", "Expletive",
         "Exploiter's", "Explosive", "Exponential", "Exposing", "Extortion", "Extraction",
@@ -75,9 +74,9 @@ def main_menu():
         ("Manage Club or Group Members", manage_group, None),
         ("Manage Positions", manage_positions, None),
         ("Manage Office Staff", groups.group_members,
         ("Manage Club or Group Members", manage_group, None),
         ("Manage Positions", manage_positions, None),
         ("Manage Office Staff", groups.group_members,
-            (office_data, ui.euid)),
+            (office_data, ui.uid)),
         ("Manage Systems Committee", groups.group_members,
         ("Manage Systems Committee", groups.group_members,
-            (syscom_data, ui.euid)),
+            (syscom_data, ui.uid)),
         ("Exit", raise_abort, None),
     ]
 
         ("Exit", raise_abort, None),
     ]
 
@@ -103,7 +102,7 @@ def new_club(*args, **kwargs):
 def manage_group(*args, **kwargs):
     push_wizard("Manage Club or Group Members", [
         groups.IntroPage,
 def manage_group(*args, **kwargs):
     push_wizard("Manage Club or Group Members", [
         groups.IntroPage,
-        (groups.InfoPage, ui.euid),
+        (groups.InfoPage, ui.uid),
     ], (60, 15))
 
 def renew_member(*args, **kwargs):
     ], (60, 15))
 
 def renew_member(*args, **kwargs):
@@ -155,10 +154,11 @@ def run():
     push_window( main_menu(), program_name() )
     event_loop( ui )
 
     push_window( main_menu(), program_name() )
     event_loop( ui )
 
-def start(euid, egid):
-    ui.euid = euid
-    ui.egid = egid
+def start(uid, gid):
+    ui.uid = uid
+    ui.gid = gid
     ui.run_wrapper( run )
 
 if __name__ == '__main__':
     ui.run_wrapper( run )
 
 if __name__ == '__main__':
-    start()
+    import os
+    start(os.getuid(), os.getgid())