Don't try to execute IGD commands if ctrlURL is empty

This commit is contained in:
Oleksii Shevchuk 2017-03-12 08:12:23 +02:00
parent aed19503f4
commit 84f2faa818
1 changed files with 8 additions and 4 deletions

View File

@ -409,6 +409,10 @@ class IGDClient(PupyModule):
igdc = self.client.conn.modules['network.lib.igd'].IGDClient
UPNPError = self.client.conn.modules['network.lib.igd'].UPNPError
self.cli.init(igdc, args, self.log)
if not self.cli.igdc.available:
self.error('IGD: Not found in LAN')
return
self.cli.igdc.enableDebug(args.DEBUG)
self.cli.igdc.enablePPrint(args.pretty_print)
try: