def get_data(self):
     logger.debug('Cloning repository for package with ID {}'.format(self.pk))
     with GitRepo.clone(self.repo) as repo:
         datafilename = pathjoin(repo.path, 'data.json')
         with open(datafilename) as datafile:
             data = json.load(datafile)
     return data
 def get_data(self):
     logger.debug('Cloning repository for package with ID {}'.format(
         self.pk))
     with GitRepo.clone(self.repo) as repo:
         datafilename = pathjoin(repo.path, 'data.json')
         with open(datafilename) as datafile:
             data = json.load(datafile)
     return data
    def sign(self, signing_actor, signing_datetime=None, ):
        if signing_datetime is None:
            signing_datetime = now()

        with GitRepo.clone(self.repo) as repo:
            tagname = '{}.{}'.format(hash(signing_actor),
                                     hash(signing_datetime))
            repo.tag(tagname,
                     "{} took action {} at {}".format(signing_actor, 'sign',
                                                      signing_datetime))
            repo.push(tags=True)
    def sign(
        self,
        signing_actor,
        signing_datetime=None,
    ):
        if signing_datetime is None:
            signing_datetime = now()

        with GitRepo.clone(self.repo) as repo:
            tagname = '{}.{}'.format(hash(signing_actor),
                                     hash(signing_datetime))
            repo.tag(
                tagname,
                "{} took action {} at {}".format(signing_actor, 'sign',
                                                 signing_datetime))
            repo.push(tags=True)