summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 23:52:04 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 23:52:04 +0000
commit7a7736848d087c6189ba6cd40ddc635f2b20438e (patch)
treea21c2e4e1f84fcf2193f17d0f2456dd1e3d56b8d /remoting
parent4f7aa49682010bf86ce82cc8d88d411d8a28ff2f (diff)
downloadchromium_src-7a7736848d087c6189ba6cd40ddc635f2b20438e.zip
chromium_src-7a7736848d087c6189ba6cd40ddc635f2b20438e.tar.gz
chromium_src-7a7736848d087c6189ba6cd40ddc635f2b20438e.tar.bz2
Fix pylint warnings.
Review URL: https://codereview.chromium.org/12316147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py36
1 files changed, 17 insertions, 19 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 132cfca..6752669 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -103,9 +103,9 @@ class Config:
os.umask(old_umask)
def save_and_log_errors(self):
- """Calls save(self), trapping and logging any errors."""
+ """Calls self.save(), trapping and logging any errors."""
try:
- save(self)
+ self.save()
except (IOError, TypeError) as e:
logging.error("Failed to save config: " + str(e))
@@ -540,20 +540,18 @@ def choose_x_session():
"/etc/X11/Xsession" ]
for session_wrapper in SESSION_WRAPPERS:
if os.path.exists(session_wrapper):
- break
- else:
- # No session wrapper found.
- return None
-
- # On Ubuntu 12.04, the default session relies on 3D-accelerated hardware.
- # Trying to run this with a virtual X display produces weird results on some
- # systems (for example, upside-down and corrupt displays). So if the
- # ubuntu-2d session is available, choose it explicitly.
- if os.path.exists("/usr/bin/unity-2d-panel"):
- return [session_wrapper, "/usr/bin/gnome-session --session=ubuntu-2d"]
-
- # Use the session wrapper by itself, and let the system choose a session.
- return session_wrapper
+ if os.path.exists("/usr/bin/unity-2d-panel"):
+ # On Ubuntu 12.04, the default session relies on 3D-accelerated
+ # hardware. Trying to run this with a virtual X display produces
+ # weird results on some systems (for example, upside-down and
+ # corrupt displays). So if the ubuntu-2d session is available,
+ # choose it explicitly.
+ return [session_wrapper, "/usr/bin/gnome-session --session=ubuntu-2d"]
+ else:
+ # Use the session wrapper by itself, and let the system choose a
+ # session.
+ return session_wrapper
+ return None
def locate_executable(exe_name):
@@ -607,10 +605,10 @@ def daemonize(log_filename):
pass
else:
# Child process
- os._exit(0)
+ os._exit(0) # pylint: disable=W0212
else:
# Parent process
- os._exit(0)
+ os._exit(0) # pylint: disable=W0212
logging.info("Daemon process running, logging to '%s'" % log_filename)
@@ -878,7 +876,7 @@ Web Store: https://chrome.google.com/remotedesktop"""
default_sizes = DEFAULT_SIZES
if os.environ.has_key(DEFAULT_SIZES_ENV_VAR):
default_sizes = os.environ[DEFAULT_SIZES_ENV_VAR]
- options.size = default_sizes.split(",");
+ options.size = default_sizes.split(",")
sizes = []
for size in options.size: