sysmoISIM-SJA2: Add suport for USIM-only and ISIM-only cards

When pysim-prog programms the application specific files of ISIM and
USIM it selects the application by its AID first. If depending on the
card profile one of the applications is missing the selection of the
related ADF will fail. Lets check the presence of the AID first and if
it is not present lets skip the programming of the related files.

Change-Id: I0eec6ed244320fcd4dc410b6fab20df9c64ff906
Related: SYS#4817
diff --git a/pySim/cards.py b/pySim/cards.py
index 0f84834..a872ee0 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -1054,20 +1054,22 @@
 		# update EF-USIM_AUTH_KEY in ADF.ISIM
 		self._scc.select_file(['3f00'])
 		aid = self.read_aid(isim = True)
-		self._scc.select_adf(aid)
-		if p.get('ki'):
-			self._scc.update_binary('af20', p['ki'], 1)
-		if p.get('opc'):
-			self._scc.update_binary('af20', p['opc'], 17)
+		if (aid):
+			self._scc.select_adf(aid)
+			if p.get('ki'):
+				self._scc.update_binary('af20', p['ki'], 1)
+			if p.get('opc'):
+				self._scc.update_binary('af20', p['opc'], 17)
 
 		# update EF-USIM_AUTH_KEY in ADF.USIM
 		self._scc.select_file(['3f00'])
 		aid = self.read_aid()
-		self._scc.select_adf(aid)
-		if p.get('ki'):
-			self._scc.update_binary('af20', p['ki'], 1)
-		if p.get('opc'):
-			self._scc.update_binary('af20', p['opc'], 17)
+		if (aid):
+			self._scc.select_adf(aid)
+			if p.get('ki'):
+				self._scc.update_binary('af20', p['ki'], 1)
+			if p.get('opc'):
+				self._scc.update_binary('af20', p['opc'], 17)
 
 		return