Skip to content

Commit

Permalink
devel-project: utilize osclib.core.request_age().
Browse files Browse the repository at this point in the history
  • Loading branch information
jberry-suse committed Jan 26, 2018
1 parent f11daf3 commit b8c91ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions devel-project.py
Expand Up @@ -16,6 +16,7 @@
from osc.core import show_project_meta
from osclib.comments import CommentAPI
from osclib.conf import Config
from osclib.core import request_age
from osclib.stagingapi import StagingAPI


Expand Down Expand Up @@ -95,11 +96,6 @@ def maintainer(args):
if len(intersection) != len(desired):
print('{} missing {}'.format(devel_project, ', '.join(desired - intersection)))

def request_age(request):
date = dateutil.parser.parse(request.statehistory[0].when)
delta = datetime.utcnow() - date
return delta.days

def requests(args):
apiurl = osc.conf.config['apiurl']
devel_projects = devel_projects_load(args)
Expand Down

0 comments on commit b8c91ea

Please sign in to comment.