Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Replaced master branch with contents of the long-running develop branch.
Old master branch code can be found in the master-v1 branch.
  • Loading branch information
gjost committed May 3, 2017
2 parents 91571d9 + 01ab0df commit 00d6bf0
Show file tree
Hide file tree
Showing 52 changed files with 6,683 additions and 2,739 deletions.
6 changes: 3 additions & 3 deletions ddr/DDR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
logger = logging.getLogger(__name__)


def format_json(data):
def format_json(data, sort_keys=True):
"""Write JSON using consistent formatting and sorting.
For versioning and history to be useful we need data fields to be written
Expand All @@ -23,7 +23,7 @@ def format_json(data):
...
['{\n', ' "a": 1,\n', ' "b": 2\n', '}']
"""
return json.dumps(data, indent=4, separators=(',', ': '), sort_keys=True)
return json.dumps(data, indent=4, separators=(',', ': '), sort_keys=sort_keys)


class Timer( object ):
Expand All @@ -41,7 +41,7 @@ class Timer( object ):
steps = []

def mark( self, msg ):
now = datetime.now()
now = datetime.now(config.TZ)
index = len(self.steps)
if index:
delta = now - self.steps[-1]['datetime']
Expand Down
Loading

0 comments on commit 00d6bf0

Please sign in to comment.