Skip to content

Commit

Permalink
Removes isinstance on filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
vpetersson committed Jul 29, 2015
1 parent 419d596 commit a001d28
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docker/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,13 @@ def parse_env_file(env_file):
"""
environment = []

if isinstance(env_file, str):
if os.path.isfile(env_file):
with open(env_file, 'r') as f:
for line in csv.reader(f, delimiter='='):
if len(line) == 2:
k = line[0].strip()
v = line[1].strip()
environment.append('{0}={1}'.format(k, v))
if os.path.isfile(env_file):
with open(env_file, 'r') as f:
for line in csv.reader(f, delimiter='='):
if len(line) == 2:
k = line[0].strip()
v = line[1].strip()
environment.append('{0}={1}'.format(k, v))

return environment

Expand Down

0 comments on commit a001d28

Please sign in to comment.