We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16af89e commit e3cb626Copy full SHA for e3cb626
1 file changed
prismacloud/api/pc_lib_utility.py
@@ -17,6 +17,15 @@
17
except NameError:
18
pass
19
20
+try:
21
+ from pathlib import Path
22
+ homefolder = str(Path.home())
23
+except:
24
+ if "USERPROFILE" in os.environ:
25
+ homefolder = os.environ["USERPROFILE"]
26
+ else:
27
+ homefolder = os.environ["HOME"]
28
+
29
# --Description-- #
30
31
# Prisma Cloud Helper library.
@@ -26,7 +35,7 @@
35
class PrismaCloudUtility():
36
""" Prisma Cloud Utility Class """
37
- CONFIG_DIRECTORY = os.path.join(os.environ['HOME'], '.prismacloud')
38
+ CONFIG_DIRECTORY = os.path.join(homefolder, '.prismacloud')
39
DEFAULT_CONFIG_FILE = os.path.join(CONFIG_DIRECTORY, 'credentials.json')
40
32
41
@classmethod
0 commit comments