From 3869b30198dc2544aa082858a8fa5aebcd74ee86 Mon Sep 17 00:00:00 2001 From: brent s Date: Sat, 9 Sep 2017 12:25:14 -0400 Subject: [PATCH] whoops --- gpg/sksdump.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gpg/sksdump.py b/gpg/sksdump.py index ec9bc6e..e8b6778 100755 --- a/gpg/sksdump.py +++ b/gpg/sksdump.py @@ -80,6 +80,8 @@ def destPrep(): except FileNotFoundError: # broken symlink try: os.remove(os.path.join(thisdir, f)) + except: + pass # just... ignore it. it's fine, whatever. # Delete if empty dir if len(os.listdir(thisdir)) == 0: os.rmdir(thisdir) @@ -92,7 +94,7 @@ def destPrep(): # pass # thisisfine.jpg os.makedirs(nowdir, exist_ok = True) if getpass.getuser() == 'root': - uid = getpwnam(sks['user']).pw_uid + uid = getpwnam(sks['user']).pw_uidFileNotFoundError gid = getgrnam(sks['group']).gr_gid for d in (sks['destdir'], nowdir): # we COULD set it as part of the os.makedirs, but iirc it doesn't set it for existing dirs os.chown(d, uid, gid)