1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-20 06:43:26 +01:00

cross platform paths

This commit is contained in:
thurask 2017-11-01 21:34:31 -04:00
parent a39cc4d050
commit 5518afd17f
No known key found for this signature in database
GPG Key ID: A6CCCDEA29795048
2 changed files with 4 additions and 2 deletions

View File

@ -138,7 +138,7 @@ class FotaCheck:
self.master_server_downvote() self.master_server_downvote()
def write_dump(self, data): def write_dump(self, data):
outfile = "logs/{}.xml".format(self.get_salt()) outfile = os.path.join("logs", "{}.xml".format(self.get_salt()))
if not os.path.exists(os.path.dirname(outfile)): if not os.path.exists(os.path.dirname(outfile)):
try: try:
os.makedirs(os.path.dirname(outfile)) os.makedirs(os.path.dirname(outfile))

View File

@ -3,4 +3,6 @@
# pylint: disable=C0111,C0326,C0103 # pylint: disable=C0111,C0326,C0103
LOGS_GLOB = "logs/*.xml" import os
LOGS_GLOB = os.path.join("logs", "*.xml")