Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5b536d7c6792
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8b00045c20d5
Choose a head ref
  • 5 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 25, 2016

  1. Copy the full SHA
    ca4e6e0 View commit details
  2. Copy the full SHA
    67ab8db View commit details
  3. Copy the full SHA
    5c6e2d7 View commit details
  4. Copy the full SHA
    3f333a5 View commit details
  5. Copy the full SHA
    8b00045 View commit details
Showing with 13 additions and 14 deletions.
  1. +6 −11 artiq/gui/log.py
  2. +1 −1 artiq/master/worker_impl.py
  3. +6 −2 artiq/protocols/pc_rpc.py
17 changes: 6 additions & 11 deletions artiq/gui/log.py
Original file line number Diff line number Diff line change
@@ -63,37 +63,32 @@ def __delitem__(self, k):
def append(self, v):
severity, source, timestamp, message = v
self.pending_entries.append((severity, source, timestamp,
message.split("\n")))

def insertRows(self, position, rows=1, index=QtCore.QModelIndex()):
self.beginInsertRows(QtCore.QModelIndex(), position, position+rows-1)
self.endInsertRows()

def removeRows(self, position, rows=1, index=QtCore.QModelIndex()):
self.beginRemoveRows(QtCore.QModelIndex(), position, position+rows-1)
self.endRemoveRows()
message.splitlines()))

def timer_tick(self):
if not self.pending_entries:
return
nrows = len(self.entries)
records = self.pending_entries
self.pending_entries = []

self.beginInsertRows(QtCore.QModelIndex(), nrows, nrows+len(records)-1)
self.entries.extend(records)
for rec in records:
item = ModelItem(self, len(self.children_by_row))
self.children_by_row.append(item)
for i in range(len(rec[3])-1):
item.children_by_row.append(ModelItem(item, i))
self.insertRows(nrows, len(records))
self.endInsertRows()

if len(self.entries) > self.depth:
start = len(self.entries) - self.depth
self.beginRemoveRows(QtCore.QModelIndex(), 0, start-1)
self.entries = self.entries[start:]
self.children_by_row = self.children_by_row[start:]
for child in self.children_by_row:
child.row -= start
self.removeRows(0, start)
self.endRemoveRows()

def index(self, row, column, parent):
if parent.isValid():
2 changes: 1 addition & 1 deletion artiq/master/worker_impl.py
Original file line number Diff line number Diff line change
@@ -255,7 +255,7 @@ def main():
short_exc_info = type(exc).__name__
exc_str = str(exc)
if exc_str:
short_exc_info += ": " + exc_str
short_exc_info += ": " + exc_str.splitlines()[0]
lines = ["Terminating with exception ("+short_exc_info+")\n"]
if hasattr(exc, "artiq_core_exception"):
lines.append(str(exc.artiq_core_exception))
8 changes: 6 additions & 2 deletions artiq/protocols/pc_rpc.py
Original file line number Diff line number Diff line change
@@ -510,9 +510,13 @@ async def _process_action(self, target, obj):
.format(obj["action"]))
except asyncio.CancelledError:
raise
except:
except Exception as exc:
short_exc_info = type(exc).__name__
exc_str = str(exc)
if exc_str:
short_exc_info += ": " + exc_str.splitlines()[0]
return {"status": "failed",
"message": traceback.format_exc()}
"message": short_exc_info + "\n" + traceback.format_exc()}
finally:
if self._noparallel is not None:
self._noparallel.release()