Browse files

Merge pull request #7 from dersphere/test_service_start

added check for xbmc.service start-attribute.
  • Loading branch information...
beenje committed Mar 26, 2014
2 parents 45148c4 + 185fb98 commit 72c9228fd34d08a71359bc30f8f587b6d8233dfd
Showing with 8 additions and 0 deletions.
  1. +8 −0 addonpr/
@@ -121,6 +121,10 @@ def get_extension_points(self):
"""Return a list of extension points (excluding metadata)"""
return [extension['point'] for extension in self.extensions]
+ def get_extensions(self, point):
+ """Return a filtered list of extensions by point-attribute"""
+ return [ext for ext in self.extensions if ext.get('point') == point]
def last_commit_date(self):
"""Return the last commit date"""
timestamp =
@@ -424,6 +428,10 @@ def check_language_dirs(self):
def check_extension_point(self):
if 'xbmc.addon.repository' in self.addon.get_extension_points():
self._error('xbmc.addon.repository extension point is not allowed')
+ for extension in self.addon.get_extensions('xbmc.service'):
+ if 'start' in extension and extension['start'] not in ('startup', 'login'):
+ self._error(('Wrong start-attribute for service extension. '
+ 'It needs to be either "startup" or "login"'))
def run(self):
"""Run all the check methods and return the numbers of warnings and errors"""

0 comments on commit 72c9228

Please sign in to comment.