]> www.vanbest.org Git - motioneye-debian/commitdiff
supress useless v4l2-ctl error message when listing devices on machines
authorCalin Crisan <ccrisan@gmail.com>
Thu, 6 Aug 2015 16:39:43 +0000 (19:39 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Thu, 6 Aug 2015 16:39:43 +0000 (19:39 +0300)
with no v4l2 devices

src/handlers.py
src/v4l2ctl.py

index 34966e77677f6732a90b50eaaba62d980fae74e3..5921ac75c19c9705ff7e78119c475b4adfc1591c 100644 (file)
@@ -517,8 +517,6 @@ class ConfigHandler(BaseHandler):
             utils.test_mjpeg_url(self.get_data(), auth_modes=['basic', 'digest'], allow_jpeg=False, callback=on_response)
         
         elif proto == 'v4l2':
-            logging.debug('listing v4l2 devices')
-            
             configured_devices = set()
             for camera_id in config.get_camera_ids():
                 data = config.get_camera(camera_id)
index 53de064a0cfb582ba705f3527f223fecf897ff14..b466e2b07c4768fa4142dc8dea344c2b43d989e5 100644 (file)
@@ -43,12 +43,12 @@ def find_v4l2_ctl():
 def list_devices():
     global _resolutions_cache, _ctrls_cache, _ctrl_values_cache
     
-    logging.debug('listing v4l devices...')
+    logging.debug('listing v4l2 devices...')
     
     try:
         output = ''
         started = time.time()
-        p = subprocess.Popen('v4l2-ctl --list-devices', shell=True, stdout=subprocess.PIPE, bufsize=1)
+        p = subprocess.Popen('v4l2-ctl --list-devices 2>/dev/null', shell=True, stdout=subprocess.PIPE, bufsize=1)
 
         fd = p.stdout.fileno()
         fl = fcntl.fcntl(fd, fcntl.F_GETFL)