Skip to content

Commit

Permalink
check min. python version; os.uname is not available on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Mar 17, 2019
1 parent 8891ba9 commit 26877ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/training/tesstrain.py
Expand Up @@ -18,6 +18,8 @@
#
import sys, os, logging

if (sys.version_info.major < 3) or (sys.version_info.major == 3 and sys.version_info.minor < 6):
raise Exception("Must be using Python minimum version 3.6!")

sys.path.insert(0, os.path.dirname(__file__))
from tesstrain_utils import (
Expand Down
3 changes: 2 additions & 1 deletion src/training/tesstrain_utils.py
Expand Up @@ -15,6 +15,7 @@
#

import os
import platform
import sys
from datetime import date
from tempfile import TemporaryDirectory, mkdtemp
Expand All @@ -37,7 +38,7 @@

class TrainingArgs(argparse.Namespace):
def __init__(self):
self.uname = os.uname().sysname.lower()
self.uname = platform.uname().system.lower()
self.lang_code = "eng"
self.timestamp = str(date.today())

Expand Down

0 comments on commit 26877ba

Please sign in to comment.