Optimisation pour TT

This commit is contained in:
2025-04-09 11:44:05 +02:00
parent bc538524fb
commit c809c12c9f
10 changed files with 30 additions and 86 deletions
+1 -6
View File
@@ -104,12 +104,7 @@ class SICEN(object):
QIcon(":/plugins/sicen/sicen.png"),
u"Ouverture des données SICEN", self.iface.mainWindow())
self.action.setEnabled(False)
IPAddr=socket.gethostbyname(socket.gethostname())
if IPAddr[0:11] == "100.100.100":
self.action.setEnabled(True)
elif IPAddr[0:9] == "192.168.0":
self.action.setEnabled(True)
elif IPAddr[0:9] == "192.168.1":
if os.access('N:/',os.R_OK):
self.action.setEnabled(True)
# connect the action to the run method
self.action.triggered.connect(self.ouverture)