summaryrefslogtreecommitdiff
path: root/cherrypy/process/plugins.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-24 15:23:17 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-24 15:23:17 -0400
commitd3c9807ba42c9b60fa077257e008caae42c3aeb0 (patch)
treec66ccc9942773417883db9aac86d2e4d83e061e2 /cherrypy/process/plugins.py
parent5786a6393617be02a795b040bf02509cab71ce76 (diff)
downloadcherrypy-git-d3c9807ba42c9b60fa077257e008caae42c3aeb0.tar.gz
Use the preferred name text_or_bytes to avoid conflation with 'basestring' which has no equivalent on Python 3.
Diffstat (limited to 'cherrypy/process/plugins.py')
-rw-r--r--cherrypy/process/plugins.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cherrypy/process/plugins.py b/cherrypy/process/plugins.py
index 0ec585c0..23c83e91 100644
--- a/cherrypy/process/plugins.py
+++ b/cherrypy/process/plugins.py
@@ -7,7 +7,7 @@ import sys
import time
import threading
-from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident
+from cherrypy._cpcompat import text_or_bytes, get_daemon, get_thread_ident
from cherrypy._cpcompat import ntob, Timer, SetDaemonProperty
# _module__file__base is used by Autoreload to make
@@ -176,7 +176,7 @@ class SignalHandler(object):
If the given signal name or number is not available on the current
platform, ValueError is raised.
"""
- if isinstance(signal, basestring):
+ if isinstance(signal, text_or_bytes):
signum = getattr(_signal, signal, None)
if signum is None:
raise ValueError("No such signal: %r" % signal)
@@ -242,7 +242,7 @@ class DropPrivileges(SimplePlugin):
self.bus.log("pwd module not available; ignoring uid.",
level=30)
val = None
- elif isinstance(val, basestring):
+ elif isinstance(val, text_or_bytes):
val = pwd.getpwnam(val)[2]
self._uid = val
uid = property(_get_uid, _set_uid,
@@ -257,7 +257,7 @@ class DropPrivileges(SimplePlugin):
self.bus.log("grp module not available; ignoring gid.",
level=30)
val = None
- elif isinstance(val, basestring):
+ elif isinstance(val, text_or_bytes):
val = grp.getgrnam(val)[2]
self._gid = val
gid = property(_get_gid, _set_gid,