From 23a0dfedb1eb93ed30a0c71fb3ae117cd0c7a50a Mon Sep 17 00:00:00 2001 From: brent s Date: Mon, 18 Sep 2017 03:13:01 -0400 Subject: [PATCH] sksdump fix. again. --- gpg/kant/.gitignore | 1 + gpg/sksdump.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gpg/kant/.gitignore b/gpg/kant/.gitignore index 30f788f..3a9c195 100644 --- a/gpg/kant/.gitignore +++ b/gpg/kant/.gitignore @@ -1 +1,2 @@ /gpgme.pdf +/tests \ No newline at end of file diff --git a/gpg/sksdump.py b/gpg/sksdump.py index d616ffb..8ecae50 100755 --- a/gpg/sksdump.py +++ b/gpg/sksdump.py @@ -113,8 +113,10 @@ def destPrep(args): if len(os.listdir(thisdir)) == 0: os.rmdir(thisdir) for d in dirs: - if len(os.listdir(os.path.join(thisdir, d))) == 0: - os.rmdir(os.path.join(thisdir, d)) + _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.removedirs(sks['destdir']) # Remove empty dirs #except: