File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,12 +252,15 @@ def source_config_file(self, config_file):
252252 Raises:
253253 FileNotFoundError: Could not find specified file or is not a file.
254254 """
255- print ('Sourcing File: {}' .format (config_file ))
256- if not config_file or not os .path .isfile (config_file ):
257- raise FileNotFoundError ('Configuration file {} does not exist.' .format (config_file ))
255+ # For compatability with older Python3 versions
256+ str_path = str (config_file )
257+
258+ print ('Sourcing File: {}' .format (str_path ))
259+ if not str_path or not os .path .isfile (str_path ):
260+ raise FileNotFoundError ('Configuration file {} does not exist.' .format (str_path ))
258261
259262 # Source config file and print out all environment vars
260- command = ['bash' , '-c' , 'source {} && env | grep ^APP_' .format (config_file )]
263+ command = ['bash' , '-c' , 'source {} && env | grep ^APP_' .format (str_path )]
261264 proc = Popen (command , stdout = PIPE )
262265
263266 # Set environment vars returned by process
You can’t perform that action at this time.
0 commit comments