|
...
|
...
|
@@ -44,16 +44,10 @@ def is_in_openstack_namespace(proj):
|
|
44
|
44
|
# stackforge, etc)
|
|
45
|
45
|
return proj.startswith('openstack/')
|
|
46
|
46
|
|
|
47
|
|
-# Rather than returning a 404 for a nonexistent file, cgit delivers a
|
|
48
|
|
-# 0-byte response to a GET request. It also does not provide a
|
|
49
|
|
-# Content-Length in a HEAD response, so the way we tell if a file exists
|
|
50
|
|
-# is to check the length of the entire GET response body.
|
|
|
47
|
+# Check if this project has a plugin file
|
|
51
|
48
|
def has_devstack_plugin(proj):
|
|
52
|
49
|
r = requests.get("https://git.openstack.org/cgit/%s/plain/devstack/plugin.sh" % proj)
|
|
53
|
|
- if len(r.text) > 0:
|
|
54
|
|
- return True
|
|
55
|
|
- else:
|
|
56
|
|
- return False
|
|
|
50
|
+ return r.status_code == 200
|
|
57
|
51
|
|
|
58
|
52
|
logging.debug("Getting project list from %s" % url)
|
|
59
|
53
|
r = requests.get(url)
|