mirror of
https://github.com/gryf/wicd.git
synced 2026-02-20 08:55:45 +01:00
seperated chmod and chown try/excepts
This commit is contained in:
@@ -1672,12 +1672,16 @@ def main(argv):
|
|||||||
if os.path.exists(logpath):
|
if os.path.exists(logpath):
|
||||||
try:
|
try:
|
||||||
os.chmod(logpath, wpath.log_perms)
|
os.chmod(logpath, wpath.log_perms)
|
||||||
|
except:
|
||||||
|
print 'unable to chmod log file to %s' % wpath.log_perms
|
||||||
|
|
||||||
|
try:
|
||||||
if wpath.log_group:
|
if wpath.log_group:
|
||||||
import grp
|
import grp
|
||||||
group = grp.getgrnam(wpath.log_group)
|
group = grp.getgrnam(wpath.log_group)
|
||||||
os.chown(logpath, 0, group[2])
|
os.chown(logpath, 0, group[2])
|
||||||
except:
|
except:
|
||||||
print 'unable to chmod log file to %s' % wpath.log_perms
|
print 'unable to chown log file to %s' % group[2]
|
||||||
|
|
||||||
if redirect_stdout: sys.stdout = output
|
if redirect_stdout: sys.stdout = output
|
||||||
if redirect_stderr: sys.stderr = output
|
if redirect_stderr: sys.stderr = output
|
||||||
|
|||||||
Reference in New Issue
Block a user