kovkus / google-apps-shell

Automatically exported from code.google.com/p/google-apps-shell
0 stars 0 forks source link

GASI Error: "add_users_to_org" #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I'm utilizing GASI on Mac OS X with Python 2.6.1

The following command returns an exception:
- gas add_users_to_org name="SomeSubOrg" users_to_move="JohnDoe"

Of course, both the SubOrg and user exist -- I've tried a fully qualified email 
address and just the username,  I've also tried removing the quotes.  Here's 
the exception it dropped out.

From the GUI:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 1410, in __call__
  File "/Users/Richie/Downloads/gasi/mac_app/gasi.app/Contents/Resources/gasi.py", line 429, in RunExecute
  File "/Users/Richie/Downloads/gasi/mac_app/gasi.app/Contents/Resources/gasi.py", line 450, in RunCommands
  File "gas.pyc", line 916, in execute
  File "gas.pyc", line 802, in add_users_to_org
UnboundLocalError: local variable 'block_inheritance' referenced before 
assignment

From the CLI:

Traceback (most recent call last):
  File "gas.py", line 928, in <module>
    __main__()
  File "gas.py", line 925, in __main__
    execute(args[1:])
  File "gas.py", line 916, in execute
    whitelist_functions[call_function](credential, **dictionary)
  File "gas.py", line 802, in add_users_to_org
    block_inheritance = str_to_bool(block_inheritance)
UnboundLocalError: local variable 'block_inheritance' referenced before 
assignment

Thanks,
Richie
Onix Networking

Original issue reported on code.google.com by ric...@onixnet.com on 21 Feb 2011 at 10:08

GoogleCodeExporter commented 9 years ago
I've attached a diff file of the fix.  I have tested and verified the fix 
against my domain.

It looks like there was a variable in use that was not declared as an arg.

Thanks,
Richie Foreman
Onix Networking

Original comment by ric...@onixnet.com on 21 Feb 2011 at 10:41

Attachments:

GoogleCodeExporter commented 9 years ago
Yep, this needs to be fixed for a current client implementation.

Original comment by g...@onixnet.com on 21 Feb 2011 at 10:42

GoogleCodeExporter commented 9 years ago
Agree

Original comment by gr...@onixnet.com on 24 Feb 2011 at 3:48