less calls to coreutils:chmod

Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
Mattias Andrée 2013-04-03 21:57:34 +02:00
parent e5db85e6da
commit 8cae06c7fd

View file

@ -128,7 +128,7 @@ class KMS():
with open(cachedir + '/.version', 'w+') as cachev: with open(cachedir + '/.version', 'w+') as cachev:
cachev.write(KMS_VERSION) cachev.write(KMS_VERSION)
if shared: if shared:
Popen('chmod 666 -- ' + _cachedir + '/.version', shell=True).wait() os.chmod(_cachedir + '/.version', 0o666)
## Get kmspony directory and kmspony file ## Get kmspony directory and kmspony file
kmsponies = cachedir + '/kmsponies/' + palettefile kmsponies = cachedir + '/kmsponies/' + palettefile
@ -154,7 +154,7 @@ class KMS():
printerr('Unable to run ponytool successfully, you need util-say>=3 for KMS support') printerr('Unable to run ponytool successfully, you need util-say>=3 for KMS support')
exit(1) exit(1)
if shared: if shared:
Popen('chmod 666 -- ' + _kmspony, shell=True).wait() os.chmod(_kmspony, 0o666)
return kmspony return kmspony