mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -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
|
*.mmdb
|
||||||
version.txt
|
version.txt
|
||||||
branch.txt
|
branch.txt
|
||||||
|
.TEST
|
||||||
|
|
||||||
# HTTPS Cert/Key #
|
# HTTPS Cert/Key #
|
||||||
##################
|
##################
|
||||||
|
|
11
Tautulli.py
11
Tautulli.py
|
@ -212,9 +212,18 @@ def main():
|
||||||
'Could not create data directory: ' + plexpy.DATA_DIR + '. Exiting....')
|
'Could not create data directory: ' + plexpy.DATA_DIR + '. Exiting....')
|
||||||
|
|
||||||
# Make sure the DATA_DIR is writeable
|
# 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(
|
raise SystemExit(
|
||||||
'Cannot write to the data directory: ' + plexpy.DATA_DIR + '. Exiting...')
|
'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
|
# Put the database in the DATA_DIR
|
||||||
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, database.FILENAME)
|
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, database.FILENAME)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue