mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Update helpers.now function
This commit is contained in:
parent
9baecb0a41
commit
f582f781f3
3 changed files with 13 additions and 12 deletions
|
@ -17,7 +17,6 @@ from __future__ import unicode_literals
|
|||
from future.builtins import object
|
||||
from future.builtins import str
|
||||
|
||||
import arrow
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
@ -28,8 +27,10 @@ from configobj import ConfigObj, ParseError
|
|||
|
||||
import plexpy
|
||||
if plexpy.PYTHON2:
|
||||
import helpers
|
||||
import logger
|
||||
else:
|
||||
from plexpy import helpers
|
||||
from plexpy import logger
|
||||
|
||||
|
||||
|
@ -268,9 +269,9 @@ def make_backup(cleanup=False, scheduler=False):
|
|||
""" Makes a backup of config file, removes all but the last 5 backups """
|
||||
|
||||
if scheduler:
|
||||
backup_file = 'config.backup-%s.sched.ini' % arrow.now().format('YYYYMMDDHHmmss')
|
||||
backup_file = 'config.backup-{}.sched.ini'.format(helpers.now(no_sep=True))
|
||||
else:
|
||||
backup_file = 'config.backup-%s.ini' % arrow.now().format('YYYYMMDDHHmmss')
|
||||
backup_file = 'config.backup-{}.ini'.format(helpers.now(no_sep=True))
|
||||
backup_folder = plexpy.CONFIG.BACKUP_DIR
|
||||
backup_file_fp = os.path.join(backup_folder, backup_file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue