d75b6d2f2b 
								
							 
						 
						
							
							
								
								Fix some bugs in udev.get_indexed_string.  
							
							... 
							
							
							
							* from_device_number raises an exception if no device found, rather than
returning None. So, instead of checking the result, catch the exception.
* Use Attributes.get() method instead of checking containment and using the
index operator. This is really the only correct way, see rhbz#1267584.
Effect of the changes:
Previously, if no device was found this method would raise an exception.
Now it returns None instead.
Previously this method read the value of the attribute corresponding to key
twice, once via 'key in attributes' and again when accessing the key.
Now, it just reads it the one time.
Reason for noticing all these problems:
In pyudev-0.18 the Attributes class is fixed, and no longer has the []
operator or __contains__ method or other methods which require a total
mapping. This patch fixes several bugs while simultaneously avoiding these
removed operators.
Signed-off-by: mulhern <amulhern@redhat.com> 
							
						 
						
							2015-12-23 09:22:48 -05:00  
				
					
						
							
							
								 
						
							
								15cb97c56e 
								
							 
						 
						
							
							
								
								udev devices may not have all the attributes;  fixes   #93  
							
							
							
						 
						
							2013-07-19 11:46:50 +02:00  
				
					
						
							
							
								 
						
							
								a8c5d3bc24 
								
							 
						 
						
							
							
								
								Nano receivers were unsupported on kernel 3.2;  fixes   #88  
							
							
							
						 
						
							2013-07-18 14:01:36 +02:00  
				
					
						
							
							
								 
						
							
								38c76393b1 
								
							 
						 
						
							
							
								
								added copyright notices to all source files  
							
							
							
						 
						
							2013-07-15 17:54:42 +02:00  
				
					
						
							
							
								 
						
							
								dbb9025e26 
								
							 
						 
						
							
							
								
								replaced _ dummies with _ignore  
							
							
							
						 
						
							2013-07-08 21:21:14 +02:00  
				
					
						
							
							
								 
						
							
								d5374b9f51 
								
							 
						 
						
							
							
								
								optionally listen for upower suspend/resume events to stop/start all receiver listeners  
							
							
							
						 
						
							2013-06-23 18:11:42 +02:00  
				
					
						
							
							
								 
						
							
								150c43f41f 
								
							 
						 
						
							
							
								
								some logging in udev  
							
							
							
						 
						
							2013-06-19 16:49:20 +02:00  
				
					
						
							
							
								 
						
							
								2a6662472d 
								
							 
						 
						
							
							
								
								account for all GLib.id_add_watch variants  
							
							
							
						 
						
							2013-06-08 21:07:24 +02:00  
				
					
						
							
							
								 
						
							
								f324b97e8b 
								
							 
						 
						
							
							
								
								use GLib.io_add_watch_full when available  
							
							
							
						 
						
							2013-06-08 15:02:44 +02:00  
				
					
						
							
							
								 
						
							
								46544e1cbe 
								
							 
						 
						
							
							
								
								listen for udev events on the GLib main loop  
							
							
							
						 
						
							2013-06-07 14:39:04 +02:00  
				
					
						
							
							
								 
						
							
								790fc7c04b 
								
							 
						 
						
							
							
								
								improved support for the Nano receiver  
							
							
							
						 
						
							2013-05-22 07:31:16 +03:00  
				
					
						
							
							
								 
						
							
								d7dd9393ff 
								
							 
						 
						
							
							
								
								minor clean-ups  
							
							
							
						 
						
							2013-05-04 17:19:48 +02:00  
				
					
						
							
							
								 
						
							
								ad577d22d0 
								
							 
						 
						
							
							
								
								handle sleep in udev monitoring,  fixes   #35  
							
							
							
						 
						
							2013-05-04 12:19:29 +02:00  
				
					
						
							
							
								 
						
							
								abca81ea38 
								
							 
						 
						
							
							
								
								fix device _match-ing in enumerate()  
							
							
							
						 
						
							2013-05-03 16:35:54 +02:00  
				
					
						
							
							
								 
						
							
								a0a76f738b 
								
							 
						 
						
							
							
								
								assert that data read/written on the receiver handle is of type bytes  
							
							
							
						 
						
							2013-05-03 16:35:28 +02:00  
				
					
						
							
							
								 
						
							
								7d440c2430 
								
							 
						 
						
							
							
								
								replace thrown OSError with IOError  
							
							
							
						 
						
							2013-05-03 16:25:32 +02:00  
				
					
						
							
							
								 
						
							
								0f80901bce 
								
							 
						 
						
							
							
								
								quicker detection of matching receivers in udev  
							
							
							
						 
						
							2013-05-02 11:11:53 +02:00  
				
					
						
							
							
								 
						
							
								c829304e31 
								
							 
						 
						
							
							
								
								use only udev events to detect receiver devices  
							
							
							
						 
						
							2013-05-01 15:47:23 +02:00  
				
					
						
							
							
								 
						
							
								f5d2eba0c4 
								
							 
						 
						
							
							
								
								hidapi: dropped native, slight update to the python implementation  
							
							... 
							
							
							
							added an optional filter for driver name when enumerating devices 
							
						 
						
							2013-04-28 14:05:33 +02:00  
				
					
						
							
							
								 
						
							
								36f34da227 
								
							 
						 
						
							
							
								
								proper debian packaging, dropper stdeb  
							
							
							
						 
						
							2013-01-05 11:48:35 +02:00  
				
					
						
							
							
								 
						
							
								064a7a113c 
								
							 
						 
						
							
							
								
								added setup.py for python and debian packaging  
							
							
							
						 
						
							2012-12-18 05:03:43 +02:00  
				
					
						
							
							
								 
						
							
								d38bec39b6 
								
							 
						 
						
							
							
								
								improved hid++ support  
							
							
							
						 
						
							2012-12-08 00:41:43 +02:00  
				
					
						
							
							
								 
						
							
								b86dcce381 
								
							 
						 
						
							
							
								
								I come from the __future__, come with me if you want to live.  
							
							
							
						 
						
							2012-12-07 17:10:22 +02:00  
				
					
						
							
							
								 
						
							
								14663ca204 
								
							 
						 
						
							
							
								
								re-wrote loading of icons for devices  
							
							
							
						 
						
							2012-11-30 15:23:16 +02:00  
				
					
						
							
							
								 
						
							
								84540fb087 
								
							 
						 
						
							
							
								
								re-wrote most of the app, based on latest HID++ docs from Logitech  
							
							
							
						 
						
							2012-11-29 04:10:16 +02:00  
				
					
						
							
							
								 
						
							
								4c5cf85091 
								
							 
						 
						
							
							
								
								re-worked the UI a bit to give better info on devices status  
							
							
							
						 
						
							2012-11-12 15:28:38 +02:00  
				
					
						
							
							
								 
						
							
								50fedab19e 
								
							 
						 
						
							
							
								
								re-worked how fd handles are used in multi-threading  
							
							
							
						 
						
							2012-11-11 17:03:13 +02:00  
				
					
						
							
							
								 
						
							
								6e939e9485 
								
							 
						 
						
							
							
								
								small documentation updates  
							
							
							
						 
						
							2012-11-06 18:44:24 +02:00  
				
					
						
							
							
								 
						
							
								5c38c33374 
								
							 
						 
						
							
							
								
								notify in case of permissions problem on the hidraw device  
							
							
							
						 
						
							2012-11-04 15:30:39 +02:00  
				
					
						
							
							
								 
						
							
								d5f8a4bc45 
								
							 
						 
						
							
							
								
								cleanup in the pyudev hidapi implementation, incremented app version  
							
							
							
						 
						
							2012-11-03 07:49:10 +02:00  
				
					
						
							
							
								 
						
							
								39855408ed 
								
							 
						 
						
							
							
								
								added pyudev-based implementation of hidapi  
							
							
							
						 
						
							2012-11-02 22:09:31 +02:00