summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever <arfrever@gentoo.org>2011-12-30 12:23:04 -0500
committerAnthony G. Basile <blueness@gentoo.org>2011-12-30 12:23:16 -0500
commitf345724471322f989701e25bb0462a8b5f458dd2 (patch)
treea5d51df1e3a1eb90fa183869040a62ea5d608c77 /WebappConfig
parentDelete some unused variables and imports. (diff)
downloadwebapp-config-f345724471322f989701e25bb0462a8b5f458dd2.tar.gz
webapp-config-f345724471322f989701e25bb0462a8b5f458dd2.tar.bz2
webapp-config-f345724471322f989701e25bb0462a8b5f458dd2.zip
Update syntax of octal numbers for compatibility with Python 3.
Reported-By: Arfrever <arfrever@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'WebappConfig')
-rw-r--r--WebappConfig/content.py2
-rw-r--r--WebappConfig/db.py4
-rw-r--r--WebappConfig/dotconfig.py2
-rw-r--r--WebappConfig/worker.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/WebappConfig/content.py b/WebappConfig/content.py
index c535e52..d6cf3f6 100644
--- a/WebappConfig/content.py
+++ b/WebappConfig/content.py
@@ -298,7 +298,7 @@ class Contents:
if not self.__p:
try:
fd = os.open(self.appdb(), os.O_WRONLY | os.O_CREAT,
- self.__perm(0600))
+ self.__perm(0o600))
os.write(fd, '\n'.join(values))
diff --git a/WebappConfig/db.py b/WebappConfig/db.py
index 856761e..aa78c24 100644
--- a/WebappConfig/db.py
+++ b/WebappConfig/db.py
@@ -370,14 +370,14 @@ class WebappDB(AppHierarchy):
OUT.die('No package specified!')
if not self.__p and not os.path.isdir(os.path.dirname(dbpath)):
- os.makedirs(os.path.dirname(dbpath), self.__dir_perm(0755))
+ os.makedirs(os.path.dirname(dbpath), self.__dir_perm(0o755))
fd = None
if not self.__p:
fd = os.open(dbpath,
os.O_WRONLY | os.O_APPEND | os.O_CREAT,
- self.__file_perm(0600))
+ self.__file_perm(0o600))
entry = str(int(time.time())) + ' ' + str(user) + ' ' + str(group)\
+ ' ' + installdir + '\n'
diff --git a/WebappConfig/dotconfig.py b/WebappConfig/dotconfig.py
index be01126..c9a5ba1 100644
--- a/WebappConfig/dotconfig.py
+++ b/WebappConfig/dotconfig.py
@@ -255,7 +255,7 @@ class DotConfig:
fd = os.open(self.__dot_config(),
os.O_WRONLY | os.O_CREAT,
- self.__perm(0600))
+ self.__perm(0o600))
os.write(fd, '\n'.join(info))
os.close(fd)
diff --git a/WebappConfig/worker.py b/WebappConfig/worker.py
index d1ece72..d57a55c 100644
--- a/WebappConfig/worker.py
+++ b/WebappConfig/worker.py
@@ -375,7 +375,7 @@ class WebappAdd:
OUT.debug('Creating directory', 8)
if not self.__p:
- os.makedirs(dst_dir, perm(0755))
+ os.makedirs(dst_dir, perm(0o755))
os.chown(dst_dir,
user,