[25443] in Source-Commits
/svn/athena r24987 - trunk/debathena/config/athinfod-cluster-config/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Feb 28 10:31:06 2011
Date: Mon, 28 Feb 2011 10:30:59 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201102281530.p1SFUxFf016928@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2011-02-28 10:30:59 -0500 (Mon, 28 Feb 2011)
New Revision: 24987
Modified:
trunk/debathena/config/athinfod-cluster-config/debian/usb-hid.py
Log:
Remove DOS linebreaks
Modified: trunk/debathena/config/athinfod-cluster-config/debian/usb-hid.py
===================================================================
--- trunk/debathena/config/athinfod-cluster-config/debian/usb-hid.py 2011-02-28 15:28:36 UTC (rev 24986)
+++ trunk/debathena/config/athinfod-cluster-config/debian/usb-hid.py 2011-02-28 15:30:59 UTC (rev 24987)
@@ -1,37 +1,37 @@
-#!/usr/bin/python
-#
-# HID interface class = 3
-# Interface Protocols:
-# 0 - None
-# 1 - KB
-# 2 - Mouse
-# 3-255 Reserved
-
-import usb
-
-protocols = { 1: 'keyboard',
- 2: 'mouse'}
-
-found = { 'keyboard' : 'no',
- 'mouse' : 'no' }
-
-for b in usb.busses():
- if 'no' not in found.values():
- break
- for d in b.devices:
- if 'no' not in found.values():
- break
- i = d.configurations[0].interfaces[0][0]
- if i.interfaceClass == 3 and \
- i.interfaceProtocol in protocols.keys():
- found[protocols[i.interfaceProtocol]] = 'yes'
-
-if 'no' not in found.values():
- print "OK - keyboard and mouse present"
-else:
- errs = []
- for k,v in found.items():
- if v == 'no':
- errs.append(k + " missing")
- print "ERROR - " + ', '.join(errs)
-
+#!/usr/bin/python
+#
+# HID interface class = 3
+# Interface Protocols:
+# 0 - None
+# 1 - KB
+# 2 - Mouse
+# 3-255 Reserved
+
+import usb
+
+protocols = { 1: 'keyboard',
+ 2: 'mouse'}
+
+found = { 'keyboard' : 'no',
+ 'mouse' : 'no' }
+
+for b in usb.busses():
+ if 'no' not in found.values():
+ break
+ for d in b.devices:
+ if 'no' not in found.values():
+ break
+ i = d.configurations[0].interfaces[0][0]
+ if i.interfaceClass == 3 and \
+ i.interfaceProtocol in protocols.keys():
+ found[protocols[i.interfaceProtocol]] = 'yes'
+
+if 'no' not in found.values():
+ print "OK - keyboard and mouse present"
+else:
+ errs = []
+ for k,v in found.items():
+ if v == 'no':
+ errs.append(k + " missing")
+ print "ERROR - " + ', '.join(errs)
+