]> thyrsus.com Git - freecode-submit.git/commitdiff
Explicit Python version check is no longer really useful.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 16 Oct 2010 10:28:24 +0000 (06:28 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 16 Oct 2010 10:28:24 +0000 (06:28 -0400)
Because the json import will blow up if the Python is too old.

freshmeat-submit

index 99849aa24c21b38de7b3692b7958d320aade4ef8..594386e79f64dc3e91e292d3028a1e459d4378dc 100755 (executable)
@@ -2,19 +2,22 @@
 #
 # freshmeat-submit -- script transactions with the Freshmeat server
 
-import sys, re
+import sys, re, urllib2, json, netrc, email.Parser, optparse, commands
 
-def error(m):
-    sys.stderr.write("freshmeat-submit: %s\n" % m)
-    sys.stderr.flush()
-    sys.exit(1)
-
-if sys.version[:6] < '2.2.0':
-    error("You must upgrade to Python 2.2.0 or better to use this code.")
-
-import urllib2, json, netrc, email.Parser, optparse, commands
+class Update:
+    "Encapsulate dictionaries describing a project metadata update."
+    def __init__(self):
+        self.name = None
+        self.per_project = {}
+        self.urlassoc = []
+        self.per_release = {}
+    def __repr__(self):
+        return "Project: " + self.name + "\n" + \
+                  "Project Data: " + `self.per_project` + "\n" + \
+                  "URLs: " + `self.urlassoc` + "\n" + \
+                  "Release Data: " + `self.per_release` + "\n"
 
-# The API implementation is sensitive to the kind of HTTP request
+# The Freshmeat API implementation is sensitive to the kind of HTTP request
 # method you use.  The general rule is:
 #
 # Reading records:                GET
@@ -33,19 +36,6 @@ class FreshmeatSessionException:
     def __init__(self, msg):
         self.msg = msg
 
-class Update:
-    "Encapsulate dictionaries describing a project metadata update."
-    def __init__(self):
-        self.name = None
-        self.per_project = {}
-        self.urlassoc = []
-        self.per_release = {}
-    def __repr__(self):
-        return "Project: " + self.name + "\n" + \
-                  "Project Data: " + `self.per_project` + "\n" + \
-                  "URLs: " + `self.urlassoc` + "\n" + \
-                  "Release Data: " + `self.per_release` + "\n"
-
 class FreshmeatSession:
     "Encapsulate the state of a Freshmeat API session."