Fix a few pylint warnings.
This commit is contained in:
		
							parent
							
								
									e429c258ca
								
							
						
					
					
						commit
						a151135e2e
					
				| @ -49,7 +49,6 @@ import gettext | ||||
| import logging | ||||
| import os | ||||
| import time | ||||
| import tempfile | ||||
| from hashlib import sha1 | ||||
| import traceback | ||||
| 
 | ||||
| @ -469,7 +468,8 @@ class Activity(Window, gtk.Container): | ||||
|         # watch visibility-notify-events to know when we can safely | ||||
|         # take a screenshot of the activity | ||||
|         self.add_events(gtk.gdk.VISIBILITY_NOTIFY_MASK) | ||||
|         self.connect('visibility-notify-event', self.__visibility_notify_event_cb) | ||||
|         self.connect('visibility-notify-event', | ||||
|                      self.__visibility_notify_event_cb) | ||||
|         self._fully_obscured = True | ||||
| 
 | ||||
|         self._active = False | ||||
|  | ||||
| @ -17,8 +17,6 @@ | ||||
| # Boston, MA 02111-1307, USA. | ||||
| 
 | ||||
| import logging | ||||
| import subprocess | ||||
| import signal | ||||
| 
 | ||||
| import dbus | ||||
| import gobject | ||||
| @ -58,14 +56,14 @@ _RAINBOW_ACTIVITY_FACTORY_INTERFACE = "org.laptop.security.Rainbow" | ||||
| # borrowed from subprocess.py | ||||
| try: | ||||
|     MAXFD = os.sysconf("SC_OPEN_MAX") | ||||
| except: | ||||
| except ValueError: | ||||
|     MAXFD = 256 | ||||
| def _close_fds(): | ||||
|     for i in xrange(3, MAXFD): | ||||
|         try: | ||||
|             os.close(i) | ||||
|         except: | ||||
|             pass | ||||
|             logging.error('Cannot close file file descriptors') | ||||
| 
 | ||||
| def create_activity_id(): | ||||
|     """Generate a new, unique ID for this activity""" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marco Pesenti Gritti
						Marco Pesenti Gritti