Fix "are you running this correctly?" check to utilise pathlib

As it was this only worked on systems with `/`-delimited path components.

So use `pathlib.Path.as_posix()` to ensure it *is* in that format.
This commit is contained in:
Athanasius 2022-08-18 15:10:03 +01:00
parent 98603273cc
commit 1384241f13
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62
4 changed files with 8 additions and 4 deletions

View File

@ -28,12 +28,13 @@ Architecture:
""" """
import argparse import argparse
import logging import logging
import pathlib
import sys import sys
import zlib import zlib
from datetime import datetime from datetime import datetime
from typing import Callable from typing import Callable
if sys.path[0].endswith('/eddn'): if pathlib.Path(sys.path[0]).as_posix().endswith('/eddn'):
print(sys.path) print(sys.path)
print( print(
''' '''

View File

@ -8,12 +8,13 @@ market data to the Announcer daemons.
""" """
import argparse import argparse
import pathlib
import sys import sys
import zlib import zlib
from datetime import datetime from datetime import datetime
from typing import Dict from typing import Dict
if sys.path[0].endswith('/eddn'): if pathlib.Path(sys.path[0]).as_posix().endswith('/eddn'):
print(sys.path) print(sys.path)
print( print(
''' '''

View File

@ -5,12 +5,13 @@ import argparse
import collections import collections
import datetime import datetime
import logging import logging
import pathlib
import sys import sys
import zlib import zlib
from threading import Thread from threading import Thread
from typing import OrderedDict from typing import OrderedDict
if sys.path[0].endswith('/eddn'): if pathlib.Path(sys.path[0]).as_posix().endswith('/eddn'):
print(sys.path) print(sys.path)
print( print(
''' '''

View File

@ -4,13 +4,14 @@
import argparse import argparse
import hashlib import hashlib
import logging import logging
import pathlib
import sys import sys
import time import time
import uuid import uuid
import zlib import zlib
from threading import Thread from threading import Thread
if sys.path[0].endswith('/eddn'): if pathlib.Path(sys.path[0]).as_posix().endswith('/eddn'):
print(sys.path) print(sys.path)
print( print(
''' '''