mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
move ISO_FORMAT to constants module
also: add ISO_FORMAT_NO_USECS
This commit is contained in:
parent
9afec263c9
commit
1cb158a4b5
2 changed files with 6 additions and 2 deletions
|
@ -66,6 +66,12 @@
|
||||||
EXIT_WARNING = 1 # reached normal end of operation, but there were issues
|
EXIT_WARNING = 1 # reached normal end of operation, but there were issues
|
||||||
EXIT_ERROR = 2 # terminated abruptly, did not reach end of operation
|
EXIT_ERROR = 2 # terminated abruptly, did not reach end of operation
|
||||||
|
|
||||||
|
# never use datetime.isoformat(), it is evil. always use one of these:
|
||||||
|
# datetime.strftime(ISO_FORMAT) # output always includes .microseconds
|
||||||
|
# datetime.strftime(ISO_FORMAT_NO_USECS) # output never includes microseconds
|
||||||
|
ISO_FORMAT_NO_USECS = '%Y-%m-%dT%H:%M:%S'
|
||||||
|
ISO_FORMAT = ISO_FORMAT_NO_USECS + '.%f'
|
||||||
|
|
||||||
DASHES = '-' * 78
|
DASHES = '-' * 78
|
||||||
|
|
||||||
PBKDF2_ITERATIONS = 100000
|
PBKDF2_ITERATIONS = 100000
|
||||||
|
|
|
@ -61,8 +61,6 @@
|
||||||
|
|
||||||
src_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
src_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
|
||||||
ISO_FORMAT = '%Y-%m-%dT%H:%M:%S.%f'
|
|
||||||
|
|
||||||
|
|
||||||
def exec_cmd(*args, archiver=None, fork=False, exe=None, input=b'', binary_output=False, **kw):
|
def exec_cmd(*args, archiver=None, fork=False, exe=None, input=b'', binary_output=False, **kw):
|
||||||
if fork:
|
if fork:
|
||||||
|
|
Loading…
Reference in a new issue