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