steveyin commited on
Commit
0c028b8
·
verified ·
1 Parent(s): 243d1e8

Update webapp.py

Browse files
Files changed (1) hide show
  1. webapp.py +6 -4
webapp.py CHANGED
@@ -290,7 +290,7 @@ class DemoCase:
290
  logging=True,
291
  **options
292
  ).start()
293
- except:
294
  # Start the stream, set best resolution
295
  self.stream0 = CamGear(
296
  source=self.url_dict[self.cam_loc],
@@ -299,7 +299,8 @@ class DemoCase:
299
  logging=True
300
  ).start()
301
  logging.warning(
302
- "failed to connect {self.url_dict[self.cam_loc]} at 720p resolution, use best resolution"
 
303
  )
304
 
305
  try:
@@ -410,7 +411,7 @@ class DemoCase:
410
  logging=True,
411
  **options
412
  ).start()
413
- except:
414
  # Start the stream, use the best resolution
415
  self.stream1 = CamGear(
416
  source=self.url_dict[self.cam_loc],
@@ -419,7 +420,8 @@ class DemoCase:
419
  logging=True
420
  ).start()
421
  logging.warning(
422
- "failed to connect {self.url_dict[self.cam_loc]} at 720p resolution, use best resolution"
 
423
  )
424
 
425
  if (self._is_tracking and self.stream1 is not None):
 
290
  logging=True,
291
  **options
292
  ).start()
293
+ except Exception:
294
  # Start the stream, set best resolution
295
  self.stream0 = CamGear(
296
  source=self.url_dict[self.cam_loc],
 
299
  logging=True
300
  ).start()
301
  logging.warning(
302
+ f"failed to connect {self.url_dict[self.cam_loc]} "
303
+ f"at 720p resolution, use best resolution"
304
  )
305
 
306
  try:
 
411
  logging=True,
412
  **options
413
  ).start()
414
+ except Exception:
415
  # Start the stream, use the best resolution
416
  self.stream1 = CamGear(
417
  source=self.url_dict[self.cam_loc],
 
420
  logging=True
421
  ).start()
422
  logging.warning(
423
+ f"failed to connect {self.url_dict[self.cam_loc]} "
424
+ f"at 720p resolution, use best resolution"
425
  )
426
 
427
  if (self._is_tracking and self.stream1 is not None):