diff --git a/Atomic/scan.py b/Atomic/scan.py index 250a974..9dd3e38 100644 --- a/Atomic/scan.py +++ b/Atomic/scan.py @@ -170,10 +170,11 @@ class Scan(Atomic): def gen_containers(): slist = [] for con in self.get_containers(): - if con['Status'].upper() != 'DEAD': + # If con does not have 'Status' return empty string + if con.get('Status', '').upper() != 'DEAD': con['input'] = con['Id'] else: - raise ValueError("The container ID {} is Dead and therefor cannot be scanned.".format(con['Id'][:12])) + raise ValueError("The container ID {} is Dead.".format(con['Id'][:12])) slist.append(con) return slist diff --git a/Atomic/syscontainers.py b/Atomic/syscontainers.py index 37b803f..32700df 100644 --- a/Atomic/syscontainers.py +++ b/Atomic/syscontainers.py @@ -193,7 +193,7 @@ class SystemContainers(object): util.write_out("Extracting to %s" % destination) - if 'display' in self.args and self.args.display: + if hasattr(self.args, 'display') and self.args.display: return if extract_only: @@ -348,7 +348,7 @@ class SystemContainers(object): repo.create(OSTree.RepoMode.BARE_USER) else: repo.create(OSTree.RepoMode.BARE) - + repo.open(None) return repo diff --git a/tests/atomic-client.js b/tests/atomic-client.js index 366853e..7be46ee 100644 --- a/tests/atomic-client.js +++ b/tests/atomic-client.js @@ -131,7 +131,7 @@ require([ var text = "Repository Last Scanned\n"; call.done(function(result) { response = JSON.parse(result); - for (var i = 2; i < response.length; i++) { + for (var i = 0; i < response.length; i++) { text += response[i]["repo"] + " "; var checkbox = document.createElement('input'); checkbox.type = "checkbox";