fix for sksdump and adding journald support for the backup script

This commit is contained in:
brent s
2017-10-24 06:04:54 -04:00
parent 3bcdb408a1
commit 33558610a6
2 changed files with 28 additions and 5 deletions

View File

@@ -120,7 +120,10 @@ def destPrep(args):
_dir = os.path.join(thisdir, d)
if os.path.isdir(_dir):
if len(os.listdir(_dir)) == 0:
os.rmdir(os.path.join(thisdir, d))
try:
os.rmdir(os.path.join(thisdir, d))
except NotADirectoryError:
pass # in case it grabs the "current" symlink
#try:
# os.removedirs(sks['destdir']) # Remove empty dirs
#except: