$ pulp-admin content delete --csv=<csv> Traceback (most recent call last): File "pulp/bin/pulp-admin", line 157, in ? admin.main() File "pulp/client/cli/base.py", line 137, in main command.main(args[1:]) File "pulp/src/pulp/client/core/base.py", line 118, in main action.main(args[1:]) File "pulp/src/pulp/client/core/base.py", line 224, in main self.run() File "pulp/src/pulp/client/core/content.py", line 270, in run if len(pobj['repos']): UnboundLocalError: local variable 'pobj' referenced before assignment
hmm I just tried it on mine and works fine. Can you tell me what you have in your csv? $ sudo pulp-admin content delete --csv=test.csv content with filename [skytux-repo-1.0-4.noarch.rpm] is currently associated other repos; Cannot perform delete; skipping Content with filename [adobe-release-i386-1.0-1.noarch.rpm] could not be found on server; skipping delete Successfully delete content [test.iso] from pulp server Content with filename [testme.iso] could not be found on server; skipping delete
I'm not able to reproduce a case for this, but I can see in what situation it might have happened. Only way this can happen is, you got back a list from server but the csv data does not match any of the pkgs and the object is not set at the end. Which seems odd as server should never have returned a list if you dont have a match. Seems like some corner case, I put in a check for this.
build: 0.143
verified [root@preethi upload]# rpm -q pulp pulp-0.0.143-1.fc14.noarch [root@preethi upload]# pulp-admin content delete --csv=/root/orphaned.csv Successfully delete content [grinder-0.0.81-1.fc14.noarch.rpm] from pulp server Successfully delete content [pulp-cds-0.0.143-1.fc14.noarch.rpm] from pulp server [root@preethi upload]# [root@preethi upload]# [root@preethi upload]# [root@preethi upload]# pulp-admin content delete --csv=/root/orphaned.csv Content with filename [grinder-0.0.81-1.fc14.noarch.rpm] could not be found on server; skipping delete Content with filename [pulp-cds-0.0.143-1.fc14.noarch.rpm] could not be found on server; skipping delete
Closing with Community Release 15 pulp-0.0.223-4.