diff --git a/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py b/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py
index 83d560c61d8c5bffa9eab20a8a7b2d921c345165..78ef1fcb2edbfc944fa25a19adb43b93294ed07b 100644
--- a/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py
+++ b/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py
@@ -91,8 +91,7 @@ class OrderWorkspaceHistory(mantid.api.PythonAlgorithm):
                         line.append(t)
 
         # l[-1][1][1:] is the comment string, with the preceeding hash stripped off
-        all_commands = [(''.join(t[1] for t in l[:-1]), l[-1][1][1:])
-                       for l in all_lines]
+        all_commands = [(''.join(t[1] for t in l[:-1]), l[-1][1][1:]) for l in all_lines]
         # Remove duplicate commands by casting commands as a set
         unique_commands = set()
         for command in all_commands: