equal
deleted
inserted
replaced
42 try: |
42 try: |
43 os.makedirs(LOGS_DIRECTORY, mode=0o775, exist_ok=True) |
43 os.makedirs(LOGS_DIRECTORY, mode=0o775, exist_ok=True) |
44 except PermissionError: |
44 except PermissionError: |
45 print("WARNING: Can't create logs directory {0}".format(LOGS_DIRECTORY)) |
45 print("WARNING: Can't create logs directory {0}".format(LOGS_DIRECTORY)) |
46 else: |
46 else: |
47 os.chown(LOGS_DIRECTORY, user_id, group_id) |
47 try: |
|
48 os.chown(LOGS_DIRECTORY, user_id, group_id) |
|
49 except PermissionError: |
|
50 print("WARNING: Can't set owner ({0}:{1}) for directory {2}".format(user_id, group_id, LOGS_DIRECTORY)) |
48 |
51 |
49 |
52 |
50 # |
53 # |
51 # Check for var directory |
54 # Check for var directory |
52 # |
55 # |