Detect non-ascii

This commit is contained in:
Tanner Collin 2022-09-04 15:36:03 -06:00
parent 78719f425a
commit 3561b29a83
2 changed files with 9 additions and 2 deletions

View File

@ -118,7 +118,7 @@ that will be gone over during the training on that machinery, and if you're
ever not comfortable with how to do something safely, please ask. Also,
everyone does unsafe things sometimes without realizing it, so if someone lets
you know you're doing something questionable, not matter what your experience
is, please listen to themthey're probably right.
is, please listen to them - they're probably right.
The main things to keep in mind are to keep your eyes and hearing safe, and
also to keep yourself from getting snagged by a machine. Sometimes things fly
@ -207,7 +207,7 @@ need to tick a few boxes:
- You must be current on your dues.
- You must show ID and provide a photo for the member directory.
- You must complete a short 1-on-1 chat with a director or designate. This is
about making sure you have the knowledge you need from usit's not a
about making sure you have the knowledge you need from us - it's not a
screening interview.
- You should also be given an in-person tour of the space, including opening
and closing procedures.

View File

@ -31,6 +31,13 @@ location = os.path.dirname(os.path.realpath(__file__))
with open(location + '/info.txt') as f:
PROTO_INFO = f.read()
for num, line in enumerate(PROTO_INFO.split('\n')):
try:
line.encode('ascii')
except UnicodeEncodeError:
print('non-ascii found in line:', num+1)
raise
def format_date(datestr):
d = datetime.strptime(datestr, '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=pytz.UTC)
d = d.astimezone(TIMEZONE_CALGARY)