Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small cleanup

  • Loading branch information...
commit f3c33028ac04cbce05c5af634e8cc172f6936be7 1 parent 2dd1091
@ebidel authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 shadowissues.py
View
7 shadowissues.py
@@ -124,7 +124,7 @@ def shadow_issue(gc_proj, gc_issue, gh_proj, gh_issues, force=False):
raise RuntimeError("unexpected response status from Github post "
"to create issue: %s\n%s\n%s"
% (response.status, response, content))
- new_issue = json.loads(content)#["issue"]
+ new_issue = json.loads(content)
assert new_issue["number"] == gh_new_id, (
"unexpected id for newly added github issue: expected %d, "
"got %d\n--\n%s" % (gh_new_id, new_issue["number"], new_issue))
@@ -228,8 +228,7 @@ def _get_gh_issues(gh_proj):
response, content = http.request(url)
if response["status"] not in ("200", "304"):
raise RuntimeError("error GET'ing %s: %s" % (url, response["status"]))
- #print json.loads(content)
- issues += json.loads(content)#["issues"]
+ issues += json.loads(content)
issues.sort(key=operator.itemgetter("number"))
return issues
@@ -282,6 +281,8 @@ def _get_gc_issues(gc_proj):
issue["published"], "%Y-%m-%dT%H:%M:%S.000Z")
issue["updated_datetime"] = datetime.datetime.strptime(
issue["updated"], "%Y-%m-%dT%H:%M:%S.000Z")
+
+ # Only care about open issues.
if issue['state'] == 'open':
issues.append(issue)
#pprint(issues)
Please sign in to comment.
Something went wrong with that request. Please try again.