Skip to content

Commit

Permalink
Use json for printing objects
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-ofer committed Sep 3, 2015
1 parent 0b0ec14 commit 4ef2c69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dynobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""Remotely manage dynamic objects"""


import json
import logging
import os
import re
Expand Down Expand Up @@ -210,9 +211,9 @@ def print_object(self, name=None):
"""
if name is None:
print self.get_objects()
print json.dumps(self.get_objects())
return
print name + ':', self.get_object(name)
print json.dumps(self.get_object(name))

def add_object(self, name, allow_existing=False):
"""Create a new empty dynamic object named 'name'."""
Expand Down

0 comments on commit 4ef2c69

Please sign in to comment.