2012-06-06 18:15:07 |
YAMAMOTO Hirotaka |
bug |
|
|
added bug |
2012-06-06 18:16:03 |
YAMAMOTO Hirotaka |
description |
Ubuntu Version: Ubuntu 12.04 LTS
Package: python-rtslib
Package Version: 2.1-2
Hi,
I found set_parameter method in rtslib.node.CFSNode class writes a trailing white space character
after parameter value, which causes runtime errors for some parameters.
Examples are "InitialR2T" and "ImmediateData" parameters for rtslib.target.TPG objects.
tpg = rtslib.target.TPG(target, 1)
tpg.set_parameter('InitialR2T', 'No')
Expected:
success.
What happened:
rtslib.utils.RTSLibError: Cannot set parameter InitialR2T: Invalid argument
Removing a trailing white space fixes this bug.
$ diff -u /usr/lib/python2.7/dist-packages/rtslib/node.py node.py
--- /usr/lib/python2.7/dist-packages/rtslib/node.py 2012-06-06 17:59:41.515308657 +0000
+++ node.py 2012-06-06 17:59:50.185146504 +0000
@@ -189,7 +189,7 @@
% str(parameter))
else:
try:
- fwrite(path, "%s \n" % str(value))
+ fwrite(path, "%s\n" % str(value))
except IOError, msg:
msg = msg[1]
raise RTSLibError("Cannot set parameter %s: %s" |
Ubuntu Version: Ubuntu 12.04 LTS
Package: python-rtslib
Package Version: 2.1-2
Hi,
I found set_parameter method in rtslib.node.CFSNode class writes a trailing white space character after parameter value, which causes runtime errors for some parameters.
Examples are "InitialR2T" and "ImmediateData" parameters for rtslib.target.TPG objects.
tpg = rtslib.target.TPG(target, 1)
tpg.set_parameter('InitialR2T', 'No')
Expected:
success.
What happened:
rtslib.utils.RTSLibError: Cannot set parameter InitialR2T: Invalid argument
Removing a trailing white space fixes this bug.
$ diff -u /usr/lib/python2.7/dist-packages/rtslib/node.py node.py
--- /usr/lib/python2.7/dist-packages/rtslib/node.py 2012-06-06 17:59:41.515308657 +0000
+++ node.py 2012-06-06 17:59:50.185146504 +0000
@@ -189,7 +189,7 @@
% str(parameter))
else:
try:
- fwrite(path, "%s \n" % str(value))
+ fwrite(path, "%s\n" % str(value))
except IOError, msg:
msg = msg[1]
raise RTSLibError("Cannot set parameter %s: %s" |
|
2012-06-11 12:38:38 |
Peter Petrakis |
attachment added |
|
fwrite_remove_trailing_space.patch https://bugs.launchpad.net/ubuntu/+source/rtslib/+bug/1009645/+attachment/3184850/+files/fwrite_remove_trailing_space.patch |
|
2012-06-11 12:39:40 |
Peter Petrakis |
bug |
|
|
added subscriber Peter Petrakis |
2012-06-11 14:56:37 |
Peter Petrakis |
description |
Ubuntu Version: Ubuntu 12.04 LTS
Package: python-rtslib
Package Version: 2.1-2
Hi,
I found set_parameter method in rtslib.node.CFSNode class writes a trailing white space character after parameter value, which causes runtime errors for some parameters.
Examples are "InitialR2T" and "ImmediateData" parameters for rtslib.target.TPG objects.
tpg = rtslib.target.TPG(target, 1)
tpg.set_parameter('InitialR2T', 'No')
Expected:
success.
What happened:
rtslib.utils.RTSLibError: Cannot set parameter InitialR2T: Invalid argument
Removing a trailing white space fixes this bug.
$ diff -u /usr/lib/python2.7/dist-packages/rtslib/node.py node.py
--- /usr/lib/python2.7/dist-packages/rtslib/node.py 2012-06-06 17:59:41.515308657 +0000
+++ node.py 2012-06-06 17:59:50.185146504 +0000
@@ -189,7 +189,7 @@
% str(parameter))
else:
try:
- fwrite(path, "%s \n" % str(value))
+ fwrite(path, "%s\n" % str(value))
except IOError, msg:
msg = msg[1]
raise RTSLibError("Cannot set parameter %s: %s" |
Ubuntu Version: Ubuntu 12.04 LTS
Package: python-rtslib
Package Version: 2.1-2
Hi,
I found set_parameter method in rtslib.node.CFSNode class writes a trailing white space character after parameter value, which causes runtime errors for some parameters.
Examples are "InitialR2T" and "ImmediateData" parameters for rtslib.target.TPG objects.
tpg = rtslib.target.TPG(target, 1)
tpg.set_parameter('InitialR2T', 'No')
Expected:
success.
What happened:
rtslib.utils.RTSLibError: Cannot set parameter InitialR2T: Invalid argument
Removing a trailing white space fixes this bug, see attached patch. |
|
2012-06-11 14:59:29 |
Peter Petrakis |
rtslib (Ubuntu): status |
New |
Confirmed |
|
2012-06-11 16:27:22 |
Ubuntu Foundations Team Bug Bot |
tags |
targetcli |
patch targetcli |
|
2012-06-11 16:27:38 |
Ubuntu Foundations Team Bug Bot |
bug |
|
|
added subscriber Ubuntu Review Team |
2013-12-18 15:18:37 |
Simon Déziel |
bug |
|
|
added subscriber Simon Déziel |