aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2016-07-01 06:28:08 +0200
committerPer Øyvind Karlsen <proyvind@moondrake.org>2016-07-01 06:28:08 +0200
commite2124bfd93871025b8990474006c31464d1667ee (patch)
tree548dc30efdcccb1be27549ba1cc501dc04b21d3c
parent6d64a6bebf611be4c273c839df8dee3ede5917fe (diff)
downloadmgarepo-e2124bfd93871025b8990474006c31464d1667ee.tar
mgarepo-e2124bfd93871025b8990474006c31464d1667ee.tar.gz
mgarepo-e2124bfd93871025b8990474006c31464d1667ee.tar.bz2
mgarepo-e2124bfd93871025b8990474006c31464d1667ee.tar.xz
mgarepo-e2124bfd93871025b8990474006c31464d1667ee.zip
drop workaround for pygithub bug now fixed
-rw-r--r--MgaRepo/GitHub.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/MgaRepo/GitHub.py b/MgaRepo/GitHub.py
index 0e120e9..c077f7b 100644
--- a/MgaRepo/GitHub.py
+++ b/MgaRepo/GitHub.py
@@ -31,25 +31,6 @@ class GitHub(object):
return True
raise Error("repository %s doesn't exist!" % (self._organization.login+"/"+pkgname))
- # workaround pygithub bug
- @staticmethod
- def __get_stats_commit_activity(self):
- """
- :calls: `GET /repos/:owner/:repo/stats/commit_activity <developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day>`_
- :rtype: None or list of :class:`github.StatsCommitActivity.StatsCommitActivity`
- """
- headers, data = self._requester.requestJsonAndCheck(
- "GET",
- self.url + "/stats/commit_activity"
- )
- if data == None:
- return None
- else:
- return [
- github.StatsCommitActivity.StatsCommitActivity(self._requester, headers, attributes, completed=True)
- for attributes in data
- ]
-
def import_package(self, target):
if not os.path.exists(target):
target = layout.checkout_url(layout.package_url(target))
@@ -58,8 +39,7 @@ class GitHub(object):
pkgname = layout.package_name(layout.remove_current(vcs.url))
repository = self.repository_exists(pkgname)
- #if not repository or not repository.get_stats_commit_activity():
- if not repository or self.__get_stats_commit_activity(repository) is None:
+ if not repository or not repository.get_stats_commit_activity():
if not repository:
if os.path.exists(vcs.path):
summary = get_pkg_tag(RPMTAG_SUMMARY, path=top_dir)