1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00

move ISO_FORMAT to constants module

also: add ISO_FORMAT_NO_USECS
This commit is contained in:
Thomas Waldmann 2017-09-05 04:44:38 +02:00
parent 9afec263c9
commit 1cb158a4b5
2 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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: