Skip to content

Commit

Permalink
Improved datetime import in system to correct load_var evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Feb 5, 2025
1 parent d2f97ad commit 5092216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Changelog
1.1.3 (unreleased)
------------------

- Nothing changed yet.

- Improved datetime import in system to correct load_var evaluation.
[sgeulette]

1.1.2 (2024-12-19)
------------------
Expand Down
4 changes: 2 additions & 2 deletions imio/pyutils/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#
from __future__ import print_function

from datetime import datetime
from six import ensure_binary
from six.moves import cPickle
from six.moves import range

import datetime # do not import datetime datetime because load_var must eval datetime.datetime(2024, 12, 19, 11, 34)
import hashlib
import os
import re
Expand Down Expand Up @@ -274,7 +274,7 @@ def get_ret_code(line):
else:
return int(match.group(1))

now = datetime.now()
now = datetime.datetime.now()
if outfile:
fh = open(outfile, "%s" % (append and "a" or "w"))
fh.write("==================== NEW RUN on {} ====================\n".format(now.strftime("%Y%m%d-%H%M")))
Expand Down

0 comments on commit 5092216

Please sign in to comment.