From ec91cf1dab2011d2fb5076f11495aa5c713593a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 17 Feb 2020 08:42:28 +0100 Subject: [PATCH] cleanup debug --- workdirfs.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/workdirfs.py b/workdirfs.py index 030dcb7..042d9ef 100755 --- a/workdirfs.py +++ b/workdirfs.py @@ -42,7 +42,7 @@ class WorkdirFS(Operations): self.xdgarchivpathbase = self.args.archive else: self.archivpathbase = os.path.join(os.environ['HOME'], self.args.archive) - self.xdgarchivpathbase = os.path.join('"$HOME', self.args.archive) + self.xdgarchivpathbase = os.path.join('$HOME', self.args.archive) self._xdg() self._give_me_today() @@ -63,7 +63,7 @@ class WorkdirFS(Operations): with fileinput.input(xdguserdirs, inplace=True) as fh: for line in fh: if line.startswith('XDG_ARCHIVE_DIR'): - print("XDG_ARCHIVE_DIR=" + self.xdgarchivpathbase, end='\n') + print('XDG_ARCHIVE_DIR="' + self.xdgarchivpathbase + '"', end='\n') foundarchive=True elif line.startswith('XDG_WORK_DIR'): print('XDG_WORK_DIR="$HOME/' + self.args.mountpoint + '"', end='\n') @@ -137,12 +137,10 @@ class WorkdirFS(Operations): if self.today.date() > self.yesterday.date(): self._cleanup_dirs() - print("zip yesterday: ", self.yesterdaypath) self.yesterday = self.today self.yesterdaypath = self.todaypath - - with open(self.configlast, 'w') as fh: - fh.write(self.today.strftime("%Y-%m-%d")) + with open(self.configlast, 'w') as fh: + fh.write(self.today.strftime("%Y-%m-%d")) return path