Skip to content

Commit 940e677

Browse files
committed
Removing log block from cleanup(), should always keep performance log
1 parent 5aaf60f commit 940e677

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/TranscodeSession.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,21 +153,14 @@ def log(self, elapsed_time, fps, compression_ratio):
153153
print(summary)
154154

155155
def cleanup(self):
156-
""" Always deletes output file, deletes log if --delete is passed from command-line
156+
""" Deletes output file if it exists
157157
"""
158158
if os.path.exists(self.path["output"]):
159159
try:
160160
os.remove(self.path["output"])
161161
except FileNotFoundError:
162162
print("Session.cleanup():", self.path["output"], "does not exist.")
163163

164-
if self.args.delete:
165-
if os.path.exists(self.path["log"]):
166-
try:
167-
os.remove(self.path["log"])
168-
except FileNotFoundError:
169-
print("Session.cleanup():", self.path["log"], "does not exist.")
170-
171164
# Check for Python 3.8 (required for shlex usage)
172165
if not (sys.version_info[0] >= 3 and sys.version_info[1] >= 8):
173166
sys.exit("\nFATAL: Requires Python3.8 or newer.\n")

0 commit comments

Comments
 (0)