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 logging
import pathlib
import sys
import zlib
from datetime import datetime
from typing import Callable
if sys.path[0].endswith('/eddn'):
if pathlib.Path(sys.path[0]).as_posix().endswith('/eddn'):
print(sys.path)
print(
'''

View File

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

View File

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

View File

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