I ran this against STAGING oxfam. check me & i'll be glad to run against oxfam prod:
[oxfam@karlhost01 current]$ bin/debug
Python 2.5.5 (r255:77872, Jun 7 2010, 14:10:57)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help" for more information. "root" is the karl root object.
>>> profiles = root['profiles']
>>> tags = root.tags
>>> for userid in tags.getUsers()
File "<console>", line 1
for userid in tags.getUsers()
^
SyntaxError: invalid syntax
>>> profiles = root['profiles']
>>> tags = root.tags
>>> for userid in tags.getUsers():
... if profiles.get(userid) is None:
... print 'Removing tags for missing user:', userid
... tags.delete(user=userid)
...
Removing tags for missing user: kuhlermckeown
19
>>> import transaction; transaction.commit()
>>>
>>>
Hi Tres,
I ran this against STAGING oxfam. check me & i'll be glad to run against oxfam prod:
[oxfam@karlhost01 current]$ bin/debug
Python 2.5.5 (r255:77872, Jun 7 2010, 14:10:57)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help" for more information. "root" is the karl root object.
>>> profiles = root['profiles']
>>> tags = root.tags
>>> for userid in tags.getUsers()
File "<console>", line 1
for userid in tags.getUsers()
^ get(userid) is None: user=userid) commit( )
SyntaxError: invalid syntax
>>> profiles = root['profiles']
>>> tags = root.tags
>>> for userid in tags.getUsers():
... if profiles.
... print 'Removing tags for missing user:', userid
... tags.delete(
...
Removing tags for missing user: kuhlermckeown
19
>>> import transaction; transaction.
>>>
>>>