From 5518afd17fe339a2e726dfc992e2c5e261db37a4 Mon Sep 17 00:00:00 2001 From: thurask Date: Wed, 1 Nov 2017 21:34:31 -0400 Subject: [PATCH] cross platform paths --- tcllib.py | 2 +- upload_logs.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tcllib.py b/tcllib.py index f61737f..63ee2b5 100644 --- a/tcllib.py +++ b/tcllib.py @@ -138,7 +138,7 @@ class FotaCheck: self.master_server_downvote() 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)): try: os.makedirs(os.path.dirname(outfile)) diff --git a/upload_logs.py b/upload_logs.py index 249aaca..8093abb 100644 --- a/upload_logs.py +++ b/upload_logs.py @@ -3,4 +3,6 @@ # pylint: disable=C0111,C0326,C0103 -LOGS_GLOB = "logs/*.xml" +import os + +LOGS_GLOB = os.path.join("logs", "*.xml")