Bug 1258003 - Raise ValueError if video_urls empty; r=maja_zf
authorAnjana Vakil <anjanavakil@gmail.com>
Mon, 21 Mar 2016 11:56:38 +0100
changeset 289732 3c4c381012154ce012797db32d312d420cdda50a
parent 289731 d1cd0639aa524dd2f04a3111e4a4e051af4a39c7
child 289733 4e844efafd5d8ccf1cf1b891503555901185d9d7
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1258003
milestone48.0a1
Bug 1258003 - Raise ValueError if video_urls empty; r=maja_zf MozReview-Commit-ID: 6YP65VWfGRA
dom/media/test/external/external_media_harness/runtests.py
--- a/dom/media/test/external/external_media_harness/runtests.py
+++ b/dom/media/test/external/external_media_harness/runtests.py
@@ -22,25 +22,27 @@ class MediaTestArgumentsBase(object):
         [['--urls'], {
             'help': 'ini file of urls to make available to all tests',
             'default': os.path.join(external_media_tests.urls, 'default.ini'),
         }],
     ]
 
     def verify_usage_handler(self, args):
         if args.urls:
-           if not os.path.isfile(args.urls):
-               raise ValueError('--urls must provide a path to an ini file')
-           else:
-               path = os.path.abspath(args.urls)
-               args.video_urls = MediaTestArgumentsBase.get_urls(path)
+            if not os.path.isfile(args.urls):
+                raise ValueError('--urls must provide a path to an ini file')
+            else:
+                path = os.path.abspath(args.urls)
+                args.video_urls = MediaTestArgumentsBase.get_urls(path)
+                if not args.video_urls:
+                    raise ValueError('list of video URLs cannot be empty')
 
     def parse_args_handler(self, args):
         if not args.tests:
-           args.tests = [external_media_tests.manifest]
+            args.tests = [external_media_tests.manifest]
 
 
     @staticmethod
     def get_urls(manifest):
         with open(manifest, 'r'):
             return [line[0] for line in read_ini(manifest)]