Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: third_party/logilab/common/daemon.py

Issue 739393004: Revert "Revert "pylint: upgrade to 1.3.1"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/logilab/common/corbautils.py ('k') | third_party/logilab/common/date.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/common/daemon.py
===================================================================
--- third_party/logilab/common/daemon.py (revision 293047)
+++ third_party/logilab/common/daemon.py (working copy)
@@ -26,6 +26,8 @@
import time
import warnings
+from six.moves import range
+
def setugid(user):
"""Change process user and group ID
@@ -46,7 +48,7 @@
raise OSError(err, os.strerror(err), 'initgroups')
os.setgid(passwd.pw_gid)
os.setuid(passwd.pw_uid)
- os.putenv('HOME', passwd.pw_dir)
+ os.environ['HOME'] = passwd.pw_dir
def daemonize(pidfile=None, uid=None, umask=077):
@@ -77,7 +79,7 @@
for i in range(3):
try:
os.dup2(null, i)
- except OSError, e:
+ except OSError as e:
if e.errno != errno.EBADF:
raise
os.close(null)
« no previous file with comments | « third_party/logilab/common/corbautils.py ('k') | third_party/logilab/common/date.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698