update dm7080 hardware drivers (frontend / demux was broken in 20170409)
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-4.3.1r1 / 0002-NimManager-re-add-deprecated-getNimType-function-to-.patch
1 From 0fcbe90768cc6e22756e49f474c4335069c93076 Mon Sep 17 00:00:00 2001
2 From: ghost <andreas.monzner@dream-property.net>
3 Date: Fri, 24 Mar 2017 18:28:33 +0100
4 Subject: [PATCH 2/9] NimManager: re-add deprecated getNimType function to NIM
5  and NimManager class
6
7 ---
8  usr/lib/enigma2/python/Components/NimManager.py | 14 ++++++++++++++
9  1 file changed, 14 insertions(+)
10
11 diff --git a/usr/lib/enigma2/python/Components/NimManager.py b/usr/lib/enigma2/python/Components/NimManager.py
12 index a5fd81d..9beba0e 100644
13 --- a/usr/lib/enigma2/python/Components/NimManager.py
14 +++ b/usr/lib/enigma2/python/Components/NimManager.py
15 @@ -548,6 +548,17 @@ class NIM(object):
16                 return self._types
17         types = property(getTypes)
18  
19 +       def getType(self):
20 +               if not self._types:
21 +                       return None
22 +               type = self._types.values()[0]
23 +               if len(self._types) > 1:
24 +                       import traceback
25 +                       print "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nNIM Slot", self.getSlotInputName(), "supports multiple types", self._types, "\nthis function is deprecated and just for backward compatibility it should not be used anymore\nplease report to plugin author... ", type, "is returned for this nim now"
26 +                       traceback.print_stack(limit = 2)
27 +               return type
28 +       type = property(getType)
29 +
30         def connectableTo(self):
31                 connectable = {
32                                 "DVB-S": ("DVB-S", "DVB-S2"),
33 @@ -823,6 +834,9 @@ class NimManager:
34                                 return True
35                 return ret
36  
37 +       def getNimType(self, slotid):
38 +               return self.nim_slots[slotid].type
39 +
40         def getNimTypes(self, slotid):
41                 return self.nim_slots[slotid].types.values()
42  
43 -- 
44 2.1.4
45