summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/analyze/__main__.py4
-rw-r--r--cloudinit/analyze/show.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/analyze/__main__.py b/cloudinit/analyze/__main__.py
index 71cba4f2..69b9e43e 100644
--- a/cloudinit/analyze/__main__.py
+++ b/cloudinit/analyze/__main__.py
@@ -130,7 +130,7 @@ def configure_io(args):
else:
try:
infh = open(args.infile, 'r')
- except (FileNotFoundError, PermissionError):
+ except OSError:
sys.stderr.write('Cannot open file %s\n' % args.infile)
sys.exit(1)
@@ -139,7 +139,7 @@ def configure_io(args):
else:
try:
outfh = open(args.outfile, 'w')
- except PermissionError:
+ except OSError:
sys.stderr.write('Cannot open file %s\n' % args.outfile)
sys.exit(1)
diff --git a/cloudinit/analyze/show.py b/cloudinit/analyze/show.py
index 3b356bb8..3e778b8b 100644
--- a/cloudinit/analyze/show.py
+++ b/cloudinit/analyze/show.py
@@ -201,7 +201,7 @@ def load_events(infile, rawdata=None):
j = None
try:
j = json.loads(data)
- except json.JSONDecodeError:
+ except ValueError:
pass
return j, data