X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tools%2Freset_gids.py;fp=tools%2Freset_gids.py;h=f4b7da52a05b78b196039930835364e440e3f153;hb=531974ce5d621b903608aa226110277f77918167;hp=453af29745091709a1fc8540b5fd00ca006a8062;hpb=3a453109b0b85e0f1ad1cf7c1743ddd6828d6385;p=sfa.git diff --git a/tools/reset_gids.py b/tools/reset_gids.py index 453af297..f4b7da52 100755 --- a/tools/reset_gids.py +++ b/tools/reset_gids.py @@ -20,7 +20,8 @@ def fix_users(): uuid = create_uuid() pkey = Keypair(create=True) pub_key=getattr(record,'reg_keys',None) - if pub_key is not None: + print pub_key + if len(pub_key) > 0: # use only first key in record if pub_key and isinstance(pub_key, types.ListType): pub_key = pub_key[0] pub_key = pub_key.key