Make Service&File entries representation human-readable.
This will help in debugging and writing web-tests. Change-Id: I748b19710f8590c6dee5e2e98e69aa8d74bb324a
This commit is contained in:
parent
554c95e77c
commit
5bda7e00f5
@ -12,6 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import StringIO
|
||||
import re
|
||||
from os.path import dirname, basename
|
||||
|
||||
from metadataclient import exc
|
||||
@ -24,6 +25,14 @@ class Wrapper(object):
|
||||
for key, value in kwargs.items():
|
||||
setattr(self, key, value)
|
||||
|
||||
def __str__(self):
|
||||
if '##' in self.id:
|
||||
return re.sub(r'##', '/', self.id)
|
||||
return self.id
|
||||
|
||||
def __repr__(self):
|
||||
return 'RowWrapper({0})'.format(str(self))
|
||||
|
||||
|
||||
class Controller(object):
|
||||
def __init__(self, http_client):
|
||||
|
Loading…
Reference in New Issue
Block a user