Config.lock() return exception when normalize is on
> > > dev=Device('172.27.62.164',user='root',passwd='lab123',normalize=True)
> > > dev.open()
> > > Device(172.27.62.164)
> > > cu=Config(dev)
> > > cu.lock()
> > > Traceback (most recent call last):
> > >   File "<stdin>", line 1, in <module>
> > >   File "/root/pyez2.0/lib/python2.7/site-packages/jnpr/junos/utils/config.py", line 467, in lock
> > >     raise LockError(rsp=JXML.remove_namespaces(err.xml))
> > > AttributeError: 'exceptions.AttributeError' object has no attribute 'xml'

If normalize is not enabled, no problem
This problem is introduced in pyez 2.0

diff --git a/lib/jnpr/junos/device.py b/lib/jnpr/junos/device.py
index 9c335e50..c2bd3712 100644
--- a/lib/jnpr/junos/device.py
+++ b/lib/jnpr/junos/device.py
@@ -919,7 +919,7 @@ class Device(_Connection):
             #    protocol: operation-failed
             #    error: device asdf not found
             # </rpc-reply>
-            if rpc_rsp_e.text.strip() is not '':
+            if rpc_rsp_e.text is not None and rpc_rsp_e.text.strip() is not '':
                 return rpc_rsp_e
             # no children, so assume it means we are OK
             return True
['lib/jnpr/junos/device.py']