mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
parent
394a411167
commit
e99063d6c0
2 changed files with 11 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,6 +23,7 @@ newsletters/*
|
|||
*.mmdb
|
||||
version.txt
|
||||
branch.txt
|
||||
.TEST
|
||||
|
||||
# HTTPS Cert/Key #
|
||||
##################
|
||||
|
|
11
Tautulli.py
11
Tautulli.py
|
@ -212,9 +212,18 @@ def main():
|
|||
'Could not create data directory: ' + plexpy.DATA_DIR + '. Exiting....')
|
||||
|
||||
# Make sure the DATA_DIR is writeable
|
||||
if not os.access(plexpy.DATA_DIR, os.W_OK):
|
||||
test_file = os.path.join(plexpy.DATA_DIR, '.TEST')
|
||||
try:
|
||||
with open(test_file, 'w'):
|
||||
pass
|
||||
except IOError:
|
||||
raise SystemExit(
|
||||
'Cannot write to the data directory: ' + plexpy.DATA_DIR + '. Exiting...')
|
||||
finally:
|
||||
try:
|
||||
os.remove(test_file)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# Put the database in the DATA_DIR
|
||||
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, database.FILENAME)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue