MCPcopy Create free account
hub / github.com/XLearning-SCU/2022-CVPR-DART / __init__

Method __init__

utils.py:133–138  ·  view source on GitHub ↗
(self, fpath=None)

Source from the content-addressed store, hash-verified

131 Code imported from https://github.com/Cysu/open-reid/blob/master/reid/utils/logging.py.
132 """
133 def __init__(self, fpath=None):
134 self.console = sys.stdout
135 self.file = None
136 if fpath is not None:
137 mkdir_if_missing(osp.dirname(fpath))
138 self.file = open(fpath, 'w')
139
140 def __del__(self):
141 self.close()

Callers

nothing calls this directly

Calls 1

mkdir_if_missingFunction · 0.85

Tested by

no test coverage detected