]> thyrsus.com Git - freecode-submit.git/commitdiff
Delete URLs not in update list (untested).
authorEric S. Raymond <esr@thyrsus.com>
Wed, 20 Oct 2010 11:06:51 +0000 (07:06 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 20 Oct 2010 11:06:51 +0000 (07:06 -0400)
freshmeat-submit

index e131afb5d73fc08b69de422dcf3146a20e12c11e..f2266495e98e9eef175ec39a290c3af4c985c2ae 100755 (executable)
@@ -153,12 +153,11 @@ class FreshmeatSession:
                                   "POST",
                                   {"url" : {"label": label, "location" : url}})
         # Delete URLs that weren't in the update list
-        # FIXME: This cannot work yet: there's no auth code!
         remove = set(permadict.keys()) - set(lambda x: x[0], urlassoc)
-        #for label in remove:
-        #    self.edit_request("projects/%s/urls/%s.json"
-        #                          % (self.permalink, permadict[label]),
-        #                          "DELETE")
+        for label in remove:
+            self.edit_request("projects/%s/urls/%s.json?auth_code=%s"
+                                  % (self.permalink, permadict[label], self.auth),
+                                  "DELETE")
 class FreshmeatMetadataFactory:
     "Factory class for producing Freshmeat records in JSON."
     freshmeat_field_map = (