Skip to content

Commit 29e75ee

Browse files
committed
only remove group CA folder if exists
1 parent 7667a95 commit 29e75ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

AWSIoTGG/GGConnector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def discover(self, thing, retry_count=5):
5050

5151
logger.debug('Persist connectivity/identity information...')
5252
# cleanup old certificates
53-
shutil.rmtree(GROUP_CA_PATH)
53+
if os.path.exists(GROUP_CA_PATH):
54+
shutil.rmtree(GROUP_CA_PATH)
5455

5556
# persist new certificate
5657
group_ca_path = GROUP_CA_PATH + group_id + \

0 commit comments

Comments
 (0)