From: Eric S. Raymond Date: Fri, 15 Oct 2010 06:08:53 +0000 (-0400) Subject: Report error from ill-formed attempt. X-Git-Tag: 2.0~31 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=c17fc5e3f8d77bd04ee092b6809613deb1a62f89;p=freecode-submit.git Report error from ill-formed attempt. --- diff --git a/freshmeat-submit b/freshmeat-submit index 8b5a22e..998a5bb 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -158,7 +158,7 @@ def crack_rpm(rpm, meta, urls): # meta["license"] = get_rpm_field("license", rpm) if not "url_homepage" in meta: meta["url_homepage"] = get_rpm_field("url", rpm) - if not "changes" in meta: + if not "changelog" in meta: # Querying gets you the first entry, apparently # blank-line-delimited. changes = get_rpm_field("changelogtext", rpm) @@ -229,8 +229,8 @@ class FreshmeatMetadataFactory: if key.endswith("List"): value = map(lambda x: x.strip(), value.split()) data.update({self.header_to_field(key) : value}) - if not 'changes' in data: - data['changes'] = message.get_payload() + if not 'changelog' in data: + data['changelog'] = message.get_payload() if prior_version and data.get("version") != prior_version: raise FreshmeatSessionException("Version conflict on stdin.") # Merge in options from the command line; @@ -308,9 +308,11 @@ if __name__ == "__main__": sys.exit(1) except urllib2.URLError, f: print >>sys.stderr,"freshmeat-submit: URLError %s" % (f.code,) + print >>sys.stderr,f.read() sys.exit(1) except urllib2.HTTPError, f: print >>sys.stderr,"freshmeat-submit: HTTPError %s" % (f.code) + print >>sys.stderr,f.read() sys.exit(1) # end