Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added the strip command and removed unused security (that cannot be used)

rajdakinc0fbf08b0859
diff --git a/constants.py b/constants.py
index 59a808bd6..5a4e29bce 100644
--- a/constants.py
+++ b/constants.py
@@ -16,9 +16,7 @@ if not (env_MEDIA_DIR is None):
MEDIA_DIR = env_MEDIA_DIR
elif os.path.exists("media_dir.txt"):
with open("media_dir.txt", 'rU') as media_file:
- MEDIA_DIR = media_file.readline()
- if MEDIA_DIR[-1] in ['\n', '\r']:
- raise Exception("media_dir.txt must be a single-line text file pointing at the media_dir place")
+ MEDIA_DIR = media_file.readline().strip()
else:
MEDIA_DIR = os.path.join(
os.path.expanduser('~'),