Re: [python-win32] Avoid bare except

2010-10-15 Thread Bill Janssen
Aahz wrote: > On Thu, Oct 14, 2010, Bill Janssen wrote: > > > > try: > > import win32api, win32security > > > > username = win32api.GetUserNameEx(win32api.NameSamCompatible) > > print 'granting "logon as a service" rights to ' + username > > policy_handle = win32security.LsaOpen

[python-win32] Avoid bare except

2010-10-15 Thread Aahz
On Thu, Oct 14, 2010, Bill Janssen wrote: > > try: > import win32api, win32security > > username = win32api.GetUserNameEx(win32api.NameSamCompatible) > print 'granting "logon as a service" rights to ' + username > policy_handle = win32security.LsaOpenPolicy(None, > win32security.