summaryrefslogtreecommitdiff
path: root/build-concerts.py
diff options
context:
space:
mode:
Diffstat (limited to 'build-concerts.py')
-rwxr-xr-xbuild-concerts.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/build-concerts.py b/build-concerts.py
index 7b0f75d..d1a7c11 100755
--- a/build-concerts.py
+++ b/build-concerts.py
@@ -1,13 +1,11 @@
#!/usr/bin/env python3
-from contextlib import contextmanager
from datetime import datetime
-import locale
from pathlib import Path
import re
from sys import argv
-from helpers import guess_language, read_concerts, relative_path
+from helpers import guess_language, read_concerts, relative_path, tmplocale
# TODO: change some jargon:
@@ -65,16 +63,6 @@ THUMBNAIL_TEMPLATE = '''\
'''
-@contextmanager
-def tmplocale(lang):
- old_lang, encoding = locale.getlocale()
- try:
- locale.setlocale(locale.LC_TIME, (lang, encoding))
- yield
- finally:
- locale.setlocale(locale.LC_TIME, (old_lang, encoding))
-
-
def format_credits(illustration):
credits = illustration.source_name