]> thyrsus.com Git - freecode-submit.git/commitdiff
Incomplete code for removing URLs that are not in the update.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 20 Oct 2010 10:19:36 +0000 (06:19 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 20 Oct 2010 10:19:36 +0000 (06:19 -0400)
freshmeat-submit

index 79730f7eff661a35a35c03129ef0220916f5605f..e131afb5d73fc08b69de422dcf3146a20e12c11e 100755 (executable)
@@ -152,7 +152,13 @@ class FreshmeatSession:
                                   % (self.permalink,),
                                   "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")
 class FreshmeatMetadataFactory:
     "Factory class for producing Freshmeat records in JSON."
     freshmeat_field_map = (