summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2014-07-31 15:43:58 +0200
committerJoel Rosdahl <joel@rosdahl.net>2014-07-31 15:43:58 +0200
commit0ee0f02626220c169cfe1a5b814b63cc07fc2263 (patch)
tree3d9c8bd9b533eb96f6ffae5a143b166d39dcbf82 /miniircd
parent8080915fba6e3ea6ed06a67420ed4fc27e2e5279 (diff)
downloadminiircd-0ee0f02626220c169cfe1a5b814b63cc07fc2263.tar.gz
miniircd-0ee0f02626220c169cfe1a5b814b63cc07fc2263.zip
Made Python code PEP8 clean
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd11
1 files changed, 6 insertions, 5 deletions
diff --git a/miniircd b/miniircd
index bfcc8fa..0eae9a8 100755
--- a/miniircd
+++ b/miniircd
@@ -33,6 +33,7 @@ import time
from datetime import datetime
from optparse import OptionParser
+
def create_directory(path):
if not os.path.isdir(path):
os.makedirs(path)
@@ -731,7 +732,7 @@ class Server(object):
client.channel_log(x, "quit (%s)" % quitmsg, meta=True)
x.remove_client(client)
if client.nickname \
- and irc_lower(client.nickname) in self.nicknames:
+ and irc_lower(client.nickname) in self.nicknames:
del self.nicknames[irc_lower(client.nickname)]
del self.clients[client.socket]
@@ -766,7 +767,7 @@ class Server(object):
(iwtd, owtd, ewtd) = select.select(
serversockets + [x.socket for x in self.clients.values()],
[x.socket for x in self.clients.values()
- if x.write_queue_size() > 0],
+ if x.write_queue_size() > 0],
[],
10)
for x in iwtd:
@@ -791,7 +792,7 @@ class Server(object):
self.print_info("Accepted connection from %s:%s." % (
addr[0], addr[1]))
for x in owtd:
- if x in self.clients: # client may have been disconnected
+ if x in self.clients: # client may have been disconnected
self.clients[x].socket_writable_notification()
now = time.time()
if last_aliveness_check + 10 < now:
@@ -896,8 +897,8 @@ def main(argv):
if (os.getuid() == 0 or os.getgid() == 0) and not options.setuid:
op.error("Running this service as root is not recommended. Use the"
" --setuid option to switch to an unprivileged account after"
- " startup. If you really intend to run as root, use \"--setuid"
- " root\".")
+ " startup. If you really intend to run as root, use"
+ " \"--setuid root\".")
ports = []
for port in re.split(r"[,\s]+", options.ports):