From 3bb52cb5100b52500ca7368b979d501bdb83fd32 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 25 Feb 2013 01:09:54 +0000 Subject: [PATCH] Use new 0o notation for octal constants * lib/mudpy/data.py: For Py3K compatibility, only refer to literal octal constants using the 0o prefix. --- lib/mudpy/data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mudpy/data.py b/lib/mudpy/data.py index 4553c7b..612b688 100644 --- a/lib/mudpy/data.py +++ b/lib/mudpy/data.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Data interface functions for the mudpy engine.""" -# Copyright (c) 2004-2012 Jeremy Stanley . Permission +# Copyright (c) 2004-2013 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. @@ -151,8 +151,8 @@ class DataFile: # if it's marked private, chmod it appropriately if self.filename in self.universe.private_files and oct( stat.S_IMODE(os.stat(self.filename)[stat.ST_MODE]) - ) != 0600: - os.chmod(self.filename, 0600) + ) != 0o0600: + os.chmod(self.filename, 0o0600) # write it back sorted, instead of using ConfigParser sections = self.data.sections() -- 2.11.0