summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-09-11 21:37:39 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-09-11 21:37:39 +0200
commit2295b37f1bf6a16740a65e4753f95924a76b9bce (patch)
tree4f8309f338d71098924c80c8942132f82ae0b8eb
parent1b2598f846e04780305cdbd184627d2c344ee8eb (diff)
downloadminiircd-2295b37f1bf6a16740a65e4753f95924a76b9bce.tar.gz
miniircd-2295b37f1bf6a16740a65e4753f95924a76b9bce.zip
Make it possible to use Python 3
Fixes #22.
-rw-r--r--CHANGES1
-rw-r--r--README.md3
-rwxr-xr-xminiircd2
3 files changed, 4 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 0cb6eff..f54ebe1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,7 @@ Unreleased
* --log-max-size: maximum size of log file before rotating
* --password-file: file from which to read connection password
* --pid-file: file to write PID to
+ * Made it possible to run miniircd in Python 3.
1.1 (2015-05-22)
diff --git a/README.md b/README.md
index 65c4e39..007faa6 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,8 @@ Limitations
Requirements
------------
-Python 2.6 or newer. Get it at http://www.python.org.
+Python 2.6 or newer. Get it at http://www.python.org. Python 3 should also
+work.
Installation
------------
diff --git a/miniircd b/miniircd
index 3d40bd6..bf4d443 100755
--- a/miniircd
+++ b/miniircd
@@ -678,7 +678,7 @@ class Server(object):
def make_pid_file(self, filename):
try:
- fd = os.open(filename, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0644)
+ fd = os.open(filename, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0o644)
os.write(fd, "%i\n" % os.getpid())
os.close(fd)
except: