selectel / pyxs

Pure Python bindings to XenStore
http://pyxs.readthedocs.org/
GNU Lesser General Public License v3.0
15 stars 15 forks source link

Allow keys to be updated to an empty string (b"") #13

Closed stephen-czetty closed 7 years ago

stephen-czetty commented 7 years ago

As released, the following code fails:

with pyxs.Client() as c: c[b"/libxl/1/device/vusb/0/port/3"] = b""

File "/usr/local/lib/python3.6/dist-packages/pyxs/client.py", line 363, in write
self.ack(Op.WRITE, path + NUL, value) File "/usr/local/lib/python3.6/dist-packages/pyxs/client.py", line 309, in ack payload = self.execute_command(*args) File "/usr/local/lib/python3.6/dist-packages/pyxs/client.py", line 293, in execute_command if not all(map(_re_7bit_ascii.match, args)):

superbobry commented 7 years ago

Looks good, thanks, Stephen!