Skip to content

Commit

Permalink
Merge pull request #20 from derekbekoe/python2-open-fix
Browse files Browse the repository at this point in the history
The open function in Python 2 returns IOError if the file doesn't exist.
  • Loading branch information
mayurid committed Feb 27, 2016
2 parents b8c520b + efff021 commit d270263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/azure/cli/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def load(self, filename, max_age=0):
self.save()
with open(self.filename, 'r', encoding='utf-8-sig') as f:
self.data = json.load(f)
except OSError:
except (OSError, IOError):
self.save()

def save(self):
Expand Down

0 comments on commit d270263

Please sign in to comment.