From 8a8214cf6d9f3a84548ba3afb10366796afeda9c Mon Sep 17 00:00:00 2001 From: Subramanian Pudukkottai Viswanathan Date: Fri, 17 May 2019 17:17:37 -0700 Subject: [PATCH] Fix for AttributeError: 'NoneType' object has no attribute pos in line 81 function emit_depend --- pyang/plugins/depend.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyang/plugins/depend.py b/pyang/plugins/depend.py index 79bb0b5a0..d171041db 100644 --- a/pyang/plugins/depend.py +++ b/pyang/plugins/depend.py @@ -75,6 +75,8 @@ def emit_depend(ctx, modules, fd): continue if ctx.opts.depend_include_path: m = ctx.get_module(i) + if m is None: + continue if ctx.opts.depend_extension is None: filename = m.pos.ref else: